Added a method for getting the raw text from an exception and unit tested it.