Make compile error reporting more flexible