Added exception reporting functionality.