You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`EInternalServerError`, HTTP 500 Internal Server Error.
45
+
-`ENotImplemented`, HTTP 501 Not Implemented.
46
+
-`EBadGateway`, HTTP 502 Bad Gateway.
47
+
-`EServiceUnavailable`, HTTP 503 Service Unavailable.
48
+
-`EGatewayTimeout`, HTTP 504 Gateway Timeout.
49
+
50
+
If you raise any of execption above, Fano Framework returns its corresponding HTPP error as response. All exception classes above derived from `EHttpException` class.
51
+
52
+
Fano Framework also defines other exceptions not related to HTTP error code. Any of these exceptions will result in HTTP 500 error response except `ERouteHandlerNotFound` which result in HTTP 404 error.
36
53
37
54
## Built-in error handler implementation
38
55
@@ -49,9 +66,11 @@ Fano Framework comes with several `IErrorHandler` implementation.
49
66
-`TDecoratorErrorHandler` abstract error handler that is decorate other error handler.
50
67
-`TConditionalErrorHandler` abstract error handler that is select one from two error handlers based on a condition. Descendant must implement its `condition()` abstract method.
51
68
-`TBoolErrorHandler` error handler that is select one from two error handlers based on a condition specified in constructor parameter.
52
-
-`TNotFoundErrorHandler` error handler that is select one from two error handlers based on a condition if the the exception is `ERouteHandlerNotFound`.
69
+
-`TNotFoundErrorHandler` error handler that is select one from two error handlers based on a condition if the the exception is `ERouteHandlerNotFound`. This is provided so you can handle HTTP 404 error separately, for example, to display different HTML template for HTTP 404 error.
70
+
-`TMethodNotAllowedErrorHandler` error handler that is select one from two error handlers based on a condition if the the exception is `EMethodNotAllowed`. This is provided so you can handle HTTP 405 error separately, for example, to use different HTML template for HTTP 405 error.
71
+
-`TInternalServerErrorHandler` error handler that is select one from two error handlers based on a condition if the the exception is `EInternalServerError`. This is provided so you can handle HTTP 500 error separately, for example, to use different HTML template for HTTP 500 error.
0 commit comments