Add a formatError function that tries harder to display useful error information.
xs
Fixes #1124.
Merge remote-tracking branch 'origin/master' into formatError
Merge remote-tracking branch 'origin/master' into formatError
Merge pull request #1441 from AnalyticalGraphicsInc/formatError

Add a formatError function that tries harder to display useful error information