What I’m looking for (can’t speak for the others): I’m writing a Blueprint function. I receive a call with invalid parameters. What are my options now?
- Do nothing: very hard to debug what went wrong because the effect might show up somewhere very far, or I might not notice for some time.
- Return a boolean success: feasible but it means I have to add success checks everywhere which turns into a pain
- Do something cheesy like make a big exclamation mark visible in the editor: sure but it’s hard to generalize, and assuming my function is called repeatedly and in many places, I can’t tell which one is wrong.
- Print some message in the console: similar problems, hard to generalize, might not notice if I’m looking at something else, etc
What I’d like would be something like one of these:
- assert fail: in the editor, execution stops and debugger shows me where I am (I can then check the execution trace to see what’s happening). In production… ignored? crashes? make it a setting?
- exception handling
(sorry, I come from a long history of languages that support it) - when unhandled, the editor/debugger steps in
- a dedicated/first-class way to report an error state that is easily visible in the editor, preferably including all locals, parameters and stack-trace
If any of these exist already, tell me - I’m new at this.
Cheers!