Added support for exceptions