Package ratpack.error

Examples of ratpack.error.ServerErrorHandler


    ClientErrorHandler clientErrorHandler = (context, statusCode) -> {
      DefaultHandlingResult.this.clientError = statusCode;
      latch.countDown();
    };

    ServerErrorHandler serverErrorHandler = (context, throwable1) -> {
      DefaultHandlingResult.this.throwable = throwable1;
      latch.countDown();
    };

    final Registry userRegistry = Registries.registry().
View Full Code Here


  public BindAddress getBindAddress() {
    return requestConstants.bindAddress;
  }

  public void error(Throwable throwable) {
    ServerErrorHandler serverErrorHandler = get(ServerErrorHandler.class);
    throwable = unpackThrowable(throwable);

    ThrowableHolder throwableHolder = getRequest().maybeGet(ThrowableHolder.class).orElse(null);
    if (throwableHolder == null) {
      getRequest().add(ThrowableHolder.class, new ThrowableHolder(throwable));

      try {
        serverErrorHandler.error(this, throwable);
      } catch (Throwable errorHandlerThrowable) {
        onErrorHandlerError(serverErrorHandler, throwable, errorHandlerThrowable);
      }
    } else {
      onErrorHandlerError(serverErrorHandler, throwableHolder.getThrowable(), throwable);
View Full Code Here

TOP

Related Classes of ratpack.error.ServerErrorHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.