Skip to content
Myr

remove whitespace at end of lines

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Alan Hamlett · committed by Markus Unterwaditzer · parent 3747487 · Browse files · 1 file+8 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−8 removed

  • other:+8 added−8 removed

1 file+8 added−8 removed

modified:flask/app.py+8 added-8 removed
1088 unmodified lines
1089 if isinstance(exc_class_or_code, integer_types):1090 exc_class = default_exceptions[exc_class_or_code]1091 else:1092 exc_class = exc_class_or_code1093 10931094 assert issubclass(exc_class, Exception)1095 10951096 if issubclass(exc_class, HTTPException):1097 return exc_class, exc_class.code1098 else:1099 return exc_class, None1100 11001101 @setupmethod1102 def errorhandler(self, code_or_exception):1103 """A decorator that is used to register a function give a given1104 error code. Example::
60 unmodified lines
1165 raise ValueError(1166 'Tried to register a handler for an exception instance {0!r}. '1167 'Handlers can only be registered for exception classes or HTTP error codes.'1168 .format(code_or_exception))1169 11691170 exc_class, code = self._get_exc_class_and_code(code_or_exception)1171 11711172 handlers = self.error_handler_spec.setdefault(key, {}).setdefault(code, {})1173 handlers[exc_class] = f11741175 @setupmethod
283 unmodified lines
1459 # Proxy exceptions don't have error codes. We want to always return1460 # those unchanged as errors1461 if e.code is None:1462 return e1463 14631464 handler = self._find_error_handler(e)1465 if handler is None:1466 return e1467 return handler(e)
34 unmodified lines
1502 # ensure not to trash sys.exc_info() at that point in case someone1503 # wants the traceback preserved in handle_http_exception. Of course1504 # we cannot prevent users from trashing it themselves in a custom1505 # trap_http_exception method so that's their fault then.1506 15061507 if isinstance(e, HTTPException) and not self.trap_http_exception(e):1508 return self.handle_http_exception(e)15091510 handler = self._find_error_handler(e)1511 15111512 if handler is None:1513 reraise(exc_type, exc_value, tb)1514 return handler(e)1515
459 unmodified lines