Added unit test for toString Exception. Fixed issue.