Compiler: better error handling