Returning an success indicator with information
I am currently building an API that does a certain action that should
indicate if that action was successful or not. I also need to know why the
action fails if it fails. How should I implement this? Should I use a void
return type and throw an exception when something wrong happens or should
I return a bool along with some kind of message to indicate why it failed?
No comments:
Post a Comment