Avoid Crashes by exception handling

Hello guys,

I’m finding a proper solution for my problem since couple of days.
I was just wondering what’s the best way to avoid the crashes which occur in UE 4.

Also wanted to know why unreal engine does not prefer the usage of try catch block ?
Is try catch block not ideal way to handle it exception in C++?

Is there any hack/tip through which I’ll be able to handle exception and prevent the editor from crash.

Any help from you guys will be appropriated.

Thanks!

It really depends on situation.
you can use try/catch but you have to keep in mind that the state of crash should be able to be recovered. this can be very hard and cumbersome and that’s the reason in many cases games rather completely stop.

another way is to have pre checks, and if they aren’t met then the actual code wont go further .
(example: you have a hardware connected, then first you check if it is available and only if it is, then you go further and accessing the hardware )