bad-except-order / E0701#
Bad except clauses order (%s)
Used when except clauses are not in the correct order (from the more specific to the more generic). If you don't fix the order, some exceptions may not be caught by the most specific handler.
try: print(int(input())) except Exception: raise except TypeError: # [bad-except-order] # This block cannot be reached since TypeError exception # is caught by previous exception handler. raise
try: print(int(input())) except TypeError: raise except Exception: raise
Created by the exceptions checker.