You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actions seem to support error handling from which I can set machine error state and even the occurred exception in the extended state to evaluate it at the caller. That's fine.
Now I started to play with Guards and it seems they don't have an exception handling, which seems by design. Any error is catched and false is returned. On first sight, that might make sense, but in combination with Choice, that leads to unwanted results.
E.g. I have a Choice, where a Guard is called. When the result is true it calls my action, if it is false it simply transitions to another state (else). When now an error occurs in the Guard (e.g. I did a NPE on accident), it results to false moving the machine into a state, I don't want it to be. Since it was a technical error that should not do any transition at all but set the machine to an error state (or at least provide a callback to do so). But maybe I'm missing something here?
The text was updated successfully, but these errors were encountered:
Actions seem to support error handling from which I can set machine error state and even the occurred exception in the extended state to evaluate it at the caller. That's fine.
Now I started to play with Guards and it seems they don't have an exception handling, which seems by design. Any error is catched and
false
is returned. On first sight, that might make sense, but in combination with Choice, that leads to unwanted results.E.g. I have a Choice, where a Guard is called. When the result is
true
it calls my action, if it isfalse
it simply transitions to another state (else). When now an error occurs in the Guard (e.g. I did a NPE on accident), it results tofalse
moving the machine into a state, I don't want it to be. Since it was a technical error that should not do any transition at all but set the machine to an error state (or at least provide a callback to do so). But maybe I'm missing something here?The text was updated successfully, but these errors were encountered: