adding a way to change the exception class