So far, our exception hook is installed (assigned to maya.utils.formatGuiException
) when the excepthandling
module is imported. This is a problem because it means excepthandling
needs to be imported for the exception hook to be assigned. If you have a whole suite of tools, you will need to make sure excepthandling
is imported early on. If you are distributing lots of separate tools, you will want to make sure each one imports excepthandling
.
There is another problem, though. Imagine two people have read this chapter and created their own excepthook
replacements which are assigned over maya.utils.formatGuiException
. These two people then write and release some scripts. These two scripts are then installed by the same user. What would happen?