Improved compilation error reporting