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
is it possible to set the WasSuccess value to false within the command without throwing an exception?
We log every thrown exception but in some commands its normal that we don't get a result so I would return null / empty result and it would be nice to react to this with the same logic as if there would have been an error.
Throwing exceptions is a bit too costly (stacktrace etc.)
The text was updated successfully, but these errors were encountered:
There's not currently a way to do this. For a workaround, you might handle the exception in the command's execute method and return a result that has your own status as a property.
I'd be interested in understanding the need here more. If you had the ability to do this, what would the API look like for it? Would it happen within the execute method, or somewhere outside of it? What's the specific case for the empty result that doesn't quite fit within the current way of doing things? Maybe throw some pseudocode here for discussion.
Hey guys,
is it possible to set the WasSuccess value to false within the command without throwing an exception?
We log every thrown exception but in some commands its normal that we don't get a result so I would return null / empty result and it would be nice to react to this with the same logic as if there would have been an error.
Throwing exceptions is a bit too costly (stacktrace etc.)
The text was updated successfully, but these errors were encountered: