Added support for throwing exception with messages