fixes #4832
Merge pull request #4838 from ticoann/error_handler

remove seg fault error from default error handling