Prototype for better error message generation