Class ScxHttpExceptionHandler

java.lang.Object
cool.scx.web.exception_handler.ScxHttpExceptionHandler
All Implemented Interfaces:
ExceptionHandler
Direct Known Subclasses:
LastExceptionHandler

public class ScxHttpExceptionHandler extends Object implements ExceptionHandler
ScxHttpException 处理器
Version:
0.0.1
Author:
scx567888
  • Constructor Details

    • ScxHttpExceptionHandler

      public ScxHttpExceptionHandler(boolean useDevelopmentErrorPage)
  • Method Details

    • sendToClient

      public static void sendToClient(cool.scx.http.status.ScxHttpStatus status, String info, cool.scx.http.routing.RoutingContext routingContext)
    • handleScxHttpException

      public void handleScxHttpException(cool.scx.http.exception.ScxHttpException scxHttpException, cool.scx.http.routing.RoutingContext routingContext)
    • canHandle

      public boolean canHandle(Throwable throwable)
      Description copied from interface: ExceptionHandler
      判断是否可以处理这个异常
      Specified by:
      canHandle in interface ExceptionHandler
    • handle

      public void handle(Throwable throwable, cool.scx.http.routing.RoutingContext routingContext)
      Description copied from interface: ExceptionHandler
      将结果处理并返回
      Specified by:
      handle in interface ExceptionHandler