File tree 1 file changed +16
-7
lines changed
app/src/processing/app/debug
1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -354,16 +354,25 @@ public void message(String s) {
354
354
355
355
if (pieces != null ) {
356
356
RunnerException e = sketch .placeException (pieces [3 ], pieces [1 ], PApplet .parseInt (pieces [2 ]) - 1 );
357
-
358
- if (e != null ) {
357
+
358
+ // replace full file path with the name of the sketch tab (unless we're
359
+ // in verbose mode, in which case don't modify the compiler output)
360
+ if (e != null && !verbose ) {
359
361
SketchCode code = sketch .getCode (e .getCodeIndex ());
360
362
String fileName = code .isExtension (sketch .getDefaultExtension ()) ? code .getPrettyName () : code .getFileName ();
361
- if (!verbose ) s = fileName + ":" + e .getCodeLine () + ": error: " + e .getMessage ();
362
- if (exception == null ) {
363
- exception = e ;
364
- exception .hideStackTrace ();
365
- }
363
+ s = fileName + ":" + e .getCodeLine () + ": error: " + e .getMessage ();
366
364
}
365
+
366
+ if (pieces [3 ].trim ().equals ("SPI.h: No such file or directory" )) {
367
+ e = new RunnerException ("Import the SPI library from the Sketch menu." );
368
+ s += "\n As of Arduino 0019, the Ethernet library depends on the SPI library." +
369
+ "\n Please import it from the Sketch > Import Library menu." ;
370
+ }
371
+
372
+ if (exception == null && e != null ) {
373
+ exception = e ;
374
+ exception .hideStackTrace ();
375
+ }
367
376
}
368
377
369
378
System .err .print (s );
You can’t perform that action at this time.
0 commit comments