handle compiler errors using an exception