Sometimes as developers we don’t Blueprints or C++ code to fail silently. Sometimes we need things to break to warn us that something unexpected went wrong. However at same time we don’t want our Editor crashing all the time either, we just need it to point us to the correct direction and then break execution, pop warnings, etc.
Exceptions are great for that. However, Blueprints do not implement nor provide any way to implement exceptions out of the box. So I built a library of self-explanatory custom nodes for that: To implement exception logic on top of Blueprints.
This plugin implements a friendly high-level exception handling library for Blueprints.
You can facilitate automation tests and help designers to have an easier quality of life when debugging game features, making use of Try / Catch / Break statements on Blueprint Uber Graphs.
There’s over 70 C++ classes to incorporate 20+ new nodes into the engine for that purpose:
- Throw and log exceptions from graphs without crashing the Unreal Editor.
- Catch Casting Failures before expending cycle resources on ‘Cast To’ nodes.
- Catch Null Pointers, Invalid Object References, with logs for programmers.
- Catch Invalid Property Values (Arguments) from gameplay graphs.
- Prevent ‘Divide-by-Zero’ errors.
These nodes are very self-explanatory and can be found under the newly introduced “Exceptions” category of your Blueprints’ Master Graphs:
This library is due to release on Unreal’s Marketplace soon.
One of those things that “should be part of the engine by default”, but for whatever reason Epic Games isn’t interested in adding to the engine due to internal philosophies.
This is now published to Unreal’s Marketplace:
unrealengine.com/marketplace/blueprint-exceptions-library