Flush stderr after printing exception in the default error handler.
Merge branch 'master' into python3
Added a function for handling errors coming externally.
Merge branch 'master' into python3
Made Python3 changes.