Improved exception handling.
Based on the work of Sergey Turchanov <turchanov@usa.net>.

12 files changed