Skip to content
Myr

More verbose message for old broken behavior

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

authored by Phil Schaf · committed by Phil Schaf · parent a6c6cc1 · Browse files · 1 file+5 added−1 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+5 added−1 removed

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:flask/app.py+5 added-1 removed
1203 unmodified lines
1204 :type key: None|str1205 :type code_or_exception: int|T<=Exception1206 :type f: callable1207 """1208 assert not isinstance(code_or_exception, HTTPException) # old broken behavior1208 if isinstance(code_or_exception, HTTPException): # old broken behavior1209 raise ValueError(1210 'Tried to register a handler for an exception instance {0!r}. '1211 'Handlers can only be registered for exception classes or HTTP error codes.'1212 .format(code_or_exception))1213 1214 code = code_or_exception1215 is_code = isinstance(code_or_exception, integer_types)1216 if not is_code:
791 unmodified lines