Adds handler and throw contexts to exception handlers.