Corrected error handling for production, development and test environments, w/ stack trace/dump in development.
Merge pull request #2 from Maciek416/master

Improved handling of errors in development