UE4 Error Handling?

OK, I’ve tried to find a good reference for this but I can’t find anything. It appears that exception handling using std:exception can only be done if turning it on manually and recompiling source, and I’m not really sure if there is any other way to ‘handle’ errors in UE4 other then not having them.

Am I wrong about this? I’m obviously writing my game to be as well as possible, but without error handling, there doesn’t seem to be an gracious way to handle failures in the game (one good example, if there is an error, I need to be sure to close database connections but I don’t really have a way to do that currently!). I’m also curious about what options I would have if I wanted to override UE4’s current error messages to show something more friendly and perhaps even provide a way to send the error and its information to me over the web.

There is no generic way of handling errors, the engine does not support exceptions by default because many platforms do not support them in native code (Android for example has some JNI issues on that side). Normally error handling in native code without exception is done by actively checking for it. Like pointer handling where you should always check for pointer correctness or use an assert if its a precondition. Active error handling is normally done by returning a bool value (or NULL for objects and INDEX_NONE for indexes), same for delegates where you can use a parameter to state success or failure.

For the error handler I think if you use a GitHub build you can change the target where to send your crash logs, or even add your own Analytics backend to the engine (check the AnalyticsET module).