Call ErrorHandler on window
Merge pull request #637 from Tahi-project/fix_error_handling

Call ErrorHandler on window