=htc,doc #18496 lots of small improvements and last missing docs
This commit is contained in:
parent
15897a3b48
commit
bb053bea2a
57 changed files with 434 additions and 189 deletions
|
|
@ -76,6 +76,7 @@ object MyImplicitExceptionHandler {
|
|||
class ExceptionHandlerExamplesSpec extends RoutingSpec {
|
||||
|
||||
"test explicit example" in {
|
||||
// tests:
|
||||
Get() ~> handleExceptions(MyExplicitExceptionHandler.myExceptionHandler) {
|
||||
_.complete((1 / 0).toString)
|
||||
} ~> check {
|
||||
|
|
@ -86,6 +87,7 @@ class ExceptionHandlerExamplesSpec extends RoutingSpec {
|
|||
"test implicit example" in {
|
||||
import akka.http.scaladsl.server._
|
||||
import MyImplicitExceptionHandler.myExceptionHandler
|
||||
// tests:
|
||||
Get() ~> Route.seal(ctx => ctx.complete((1 / 0).toString)) ~> check {
|
||||
responseAs[String] === "Bad numbers, bad result!!!"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue