Added new macro to define exception classes