exception changed to macros to get correct line number in stack trace