@@ -536,9 +536,7 @@ public void message(String s) {
536
536
537
537
RunnerException exception = placeException (error , pieces [1 ], PApplet .parseInt (pieces [2 ]) - 1 );
538
538
539
- // replace full file path with the name of the sketch tab (unless we're
540
- // in verbose mode, in which case don't modify the compiler output)
541
- if (exception != null && !verbose ) {
539
+ if (exception != null ) {
542
540
SketchCode code = sketch .getCode (exception .getCodeIndex ());
543
541
String fileName = (code .isExtension ("ino" ) || code .isExtension ("pde" )) ? code .getPrettyName () : code .getFileName ();
544
542
int lineNum = exception .getCodeLine () + 1 ;
@@ -568,15 +566,10 @@ public void message(String s) {
568
566
System .err .println (s );
569
567
}
570
568
571
- private RunnerException placeException (String message ,
572
- String dotJavaFilename ,
573
- int dotJavaLine ) {
574
- // Placing errors is simple, because we inserted #line directives
575
- // into the preprocessed source. The compiler gives us correct
576
- // the file name and line number. :-)
569
+ private RunnerException placeException (String message , String fileName , int line ) {
577
570
for (SketchCode code : sketch .getCodes ()) {
578
- if (dotJavaFilename .equals (code .getFileName ())) {
579
- return new RunnerException (message , sketch .indexOfCode (code ), dotJavaLine );
571
+ if (new File ( fileName ). getName () .equals (code .getFileName ())) {
572
+ return new RunnerException (message , sketch .indexOfCode (code ), line );
580
573
}
581
574
}
582
575
return null ;
0 commit comments