|
@@ -112,6 +112,13 @@ class ContextInterface(object):
|
112
|
112
|
exception_class: typing.Type[Exception],
|
113
|
113
|
http_code: int,
|
114
|
114
|
) -> None:
|
|
115
|
+ """
|
|
116
|
+ Enable management of this exception during execution of views. If this
|
|
117
|
+ exception caught, an http response will be returned with this http
|
|
118
|
+ code.
|
|
119
|
+ :param exception_class: Exception class to catch
|
|
120
|
+ :param http_code: HTTP code to use in response if exception caught
|
|
121
|
+ """
|
115
|
122
|
raise NotImplementedError()
|
116
|
123
|
|
117
|
124
|
def handle_exceptions(
|
|
@@ -119,13 +126,13 @@ class ContextInterface(object):
|
119
|
126
|
exception_classes: typing.List[typing.Type[Exception]],
|
120
|
127
|
http_code: int,
|
121
|
128
|
) -> None:
|
122
|
|
- raise NotImplementedError()
|
123
|
|
-
|
124
|
|
- def _add_exception_class_to_catch(
|
125
|
|
- self,
|
126
|
|
- exception_class: typing.List[typing.Type[Exception]],
|
127
|
|
- http_code: int,
|
128
|
|
- ) -> None:
|
|
129
|
+ """
|
|
130
|
+ Enable management of these exceptions during execution of views. If
|
|
131
|
+ this exception caught, an http response will be returned with this http
|
|
132
|
+ code.
|
|
133
|
+ :param exception_classes: Exception classes to catch
|
|
134
|
+ :param http_code: HTTP code to use in response if exception caught
|
|
135
|
+ """
|
129
|
136
|
raise NotImplementedError()
|
130
|
137
|
|
131
|
138
|
|