Feature request: A way to determine which node may have thrown an exception during tick
Is your feature request related to a problem? Please describe.
Our product utilizes BehaviorTree.CPP as our behavior tree runtime, and we've had multiple customers run into issues either in our product or their own customizations of it where a behavior throws an exception for whatever reason. The tree fails, but it's not clear which behavior did it. As far as I've been able to tell, there's no clear way to determine which node(s) may have been the culprit when an exception is thrown during .tickOnce().
Describe the solution you'd like
A way to know which behavior was ticked last in the tree, which is at least a way we can suggest to a consumer "this behavior might be the culprit". Does this already exist and I'm just missing it?
Describe alternatives you've considered
If I were solving this problem green-field, I would probably make the Node base classes catch and re-throw exceptions with some annotation in their message saying which behavior it came from. But that might be too invasive for an existing project with existing conventions.
This is a good idea. Maybe your company wants to sponsor this feature...
I would go a step further an create some kind of backtrace visualization!
"sponsor" as in "write it ourselves and open a PR" (which we might do if a couple more customers experience this) or "sponsor" as in "pay you to do it"? I can ask internally about the latter if you're open to that.
both options will be greatly appreciated!!!!
For the record, I meant the latter, but the former is great too.