=htc,doc #18496 lots of small improvements and last missing docs

This commit is contained in:
Konrad Malawski 2015-10-09 15:19:36 +02:00
parent 15897a3b48
commit bb053bea2a
57 changed files with 434 additions and 189 deletions

View file

@ -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!!!"
}