Tidy up compile error reporting