Skip to content

Commit

Permalink
review: update errorCode() javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
dimas-b committed Jul 15, 2024
1 parent 0b28482 commit 6fd3824
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,15 @@ public interface TaskState {
String message();

/**
* An error code associated with this task state. Error code are meant to be interpreted by the
* {@link TaskBehavior} implementation that manages the related task.
* An error code associated with this task state. Error codes are machine-readable representations
* of failures and are meant to be interpreted by the {@link TaskBehavior} implementation that
* manages the related task.
*
* <p>In general, error codes are intended to allow reporting task errors / exceptions to the
* caller the same way whether the task fails for the first time in the server that executed it,
* or it is reloaded from storage in another server.
* <p>On the other hand, the value of {@link #message()} is meant to be interpreted by humans.
*
* <p>Storing error codes in {@link TaskState} is intended to allow reporting task errors /
* exceptions to the caller the same way whether the task fails for the first time in the server
* that executed it, or it is reloaded from storage in another server.
*
* @see TaskBehavior#stateAsException(TaskObj)
*/
Expand Down

0 comments on commit 6fd3824

Please sign in to comment.