~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/cgirequest.py

Remove both normal and cgirequest's throw_error().

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
        else:
250
250
            return sys.stdin.read(len)
251
251
 
252
 
    def throw_error(self, httpcode, message):
253
 
        """Writes out an HTTP error of the specified code. Exits the process,
254
 
        so any code following this call will not be executed.
255
 
 
256
 
        (This is justified because of the nature of CGI, it is a single-script
257
 
        environment, there is no containing process which needs to catch an
258
 
        exception).
259
 
 
260
 
        httpcode: An HTTP response status code. Pass a constant from the
261
 
        Request class.
262
 
        """
263
 
        raise ivle.util.IVLEError(httpcode, message)
264
 
 
265
252
    def handle_unknown_exception(self, exc_type, exc_value, exc_tb):
266
253
        if exc_type is ivle.util.IVLEError:
267
254
            self.headers_out['X-IVLE-Error-Code'] = exc_value.httpcode