Add more support for exception handling