Is there a function in python 3 that is an equivalent to PHP's set_error_handler function? Is it good idea to use this equivalent in python scripting or there is better solution?
What I like about set_error_handler is that I can assign to it a function that for example logs and/or emails me when something goes wrong. I can then use trigger_error in my code and error_handler function will report back to me what and where did happen. any ideas how to replace it in python?