Pieter
New Contributor II

Hey Lozik,

Ran into this myself as well. The reason this doesn't work is because Databricks is using Ipython under the hood.

The following codesnippet creates an exception hook for all exceptions (using the general Exception), it's also possible to specify which exception you wish to add an hook. `exception_handler` was the function I used for handling the exceptions

# Add hook to exception handling
ipy = get_ipython()
ipy.set_custom_exc((Exception,), exception_handler)
 

Additional documentation can be found here: Document

Good luck!