compile --preprocess
panics if #include
d file not found
#1947
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Describe the problem
If a sketch contains an
#include
directive for a file not present in any of the search paths, thearduino-cli compile --preprocess
command panics.To reproduce
🐛 The stack trace from the panic does not provide any information of value to the user and may give them the impression the error was the result of a bug in Arduino CLI instead of with their sketch code.
Expected behavior
Arduino CLI only panics on unexpected (i.e., caused by a bug in the Arduino CLI codebase) failures. Any failure that can result from normal (even if incorrect) usage should be handled gracefully.
Arduino CLI version
13f2255
Operating system
Windows
Operating system version
10
Additional context
I bisected the introduction of the bug to 75b9760 / #1251
Before that, the output under these conditions was the more friendly:
Issue checklist
The text was updated successfully, but these errors were encountered: