updated context error messages. utility macros for getting error code CLASS/TYPE