Improved exception printing mechanism