Added better Exception handling in TMParser.