Mark Gritter (markgritter) wrote,
Mark Gritter
markgritter

Error Messages Are Hard, a continuing series

Poor little compiler.

compile:
    [javac] Compiling 95 source files to /hg/tc/out/classes
    [javac] /hg/tc/src/java/com/tintri/platform/YYY.java:64: '(' expected
    [javac]         } else if if ( result == 1 ) {
    [javac]                  ^
    [javac] /hg/tc/src/java/com/tintri/platform/YYY:64: illegal start of expression
    [javac]         } else if if ( result == 1 ) {
    [javac]                   ^
    [javac] /hg/tc/src/java/com/tintri/platform/YYY.java:64: ')' expected
    [javac]         } else if if ( result == 1 ) {
    [javac]                     ^
    [javac] /hg/tc/src/java/com/tintri/platform/YYY.java:64: not a statement
    [javac]         } else if if ( result == 1 ) {
    [javac]                               ^
    [javac] /hg/tc/src/java/com/tintri/platform/YYY.java:64: ';' expected
    [javac]         } else if if ( result == 1 ) {
    [javac]                                   ^
    [javac] 5 errors


However, I think it could do better. That's only 5 errors out of 8 tokens remaining on the line. Why not one error message per token?
Tags: error messages are hard, programming
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments