Browse Source

comment and remove interface method

Bastien Sevajol 6 years ago
parent
commit
64ed503ee1
1 changed files with 14 additions and 7 deletions
  1. 14 7
      hapic/context.py

+ 14 - 7
hapic/context.py View File

112
         exception_class: typing.Type[Exception],
112
         exception_class: typing.Type[Exception],
113
         http_code: int,
113
         http_code: int,
114
     ) -> None:
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
         raise NotImplementedError()
122
         raise NotImplementedError()
116
 
123
 
117
     def handle_exceptions(
124
     def handle_exceptions(
119
         exception_classes: typing.List[typing.Type[Exception]],
126
         exception_classes: typing.List[typing.Type[Exception]],
120
         http_code: int,
127
         http_code: int,
121
     ) -> None:
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
         raise NotImplementedError()
136
         raise NotImplementedError()
130
 
137
 
131
 
138