hello?
Development using Unreal C++ is in progress, but if you look at the classes provided by unreal, it seems that try-catch is not used. Why?
Is the basic safety device built into unreal itself? Or does unreal’s own coding standard exist?
hello?
Development using Unreal C++ is in progress, but if you look at the classes provided by unreal, it seems that try-catch is not used. Why?
Is the basic safety device built into unreal itself? Or does unreal’s own coding standard exist?
What do you mean not used? I scanned over 350 files containing try / catch in UE4-27 source.
Asserts are preferred.
I’ve been programming professionally with C++ for about 13 years now, and I had completely forgotten that there even is a try…catch construct in C++.
Most of the times you might consider using a try…catch, probably falls into one of these “Do not use try…catch for this” rules according to ISOCPP.ORG
That said, as Seda145 says, they are used in some places in engine, but for the most part, you’re probably going to want to assert() when Something Bad™ happens