#1305 added support for providing a type for the exception variable. However, not all types are valid there. I believe you can throw an exception object, or a string. So, we should find a way to validate the type there to ensure it conforms to the necessary structure.