Skip to content

Commit

Permalink
#55: Exception handling docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw committed Mar 18, 2019
1 parent 4630c9c commit 2c76143
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions doc/server/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ endpoint
.toRoute((logic _).andThen(handleErrors))
```

In the above example, errors are represented as `String`s (aliased to `ErrorInfo` for readability), and when the
logic completes successfuly an `Int` is returned. Any exceptions that are raised are logged, and represented as a
value of type `ErrorInfo`. Following the convention, the left side of the `Either[ErrorInfo, T]` represents an
exception, and the right side success.
In the above example, errors are represented as `String`s (aliased to `ErrorInfo` for readability). When the
logic completes successfully an `Int` is returned. Any exceptions that are raised are logged, and represented as a
value of type `ErrorInfo`.

Following the convention, the left side of the `Either[ErrorInfo, T]` represents an error, and the right side success.

0 comments on commit 2c76143

Please sign in to comment.