Exception Interception

How does one get the information on what the actual error is?

The docs talk about the exceptionBean, but that throws an undefined error.

Especially when trying to get the stack trace for onInvalidEvent.