larsiusprime / crashdumper

A cross-platform automated crash report generator/sender for Haxe/OpenFL apps.
MIT License
113 stars 33 forks source link

Added a __hxcpp_set_critical_error_handler #8

Closed davidmaletz closed 10 years ago

davidmaletz commented 10 years ago

This catches additional errors that are bypassed in the normal UncaughtErrorEvent, and then throws an error message which is then caught and handled normally.

larsiusprime commented 10 years ago

This is super great. Real quick before I hit "merge" -- can you supply an example of a function that generates a hxcpp crash that is caught by this change, but not by UncaughtErrorEvent?

davidmaletz commented 10 years ago

For me, running windows 8, any null pointer exception seems to be a critical error. var b:BitmapData = null; b.clone(); Will crash the program with a "Null Object Pointer" windows dialog and no crash report. With this change, I get a crash log with the error being a string called "Null Object Reference."

larsiusprime commented 10 years ago

Brilliant, thanks. I'll give it a try soon as I'm back to my dev machine, then I'll merge. Well done!