.. _wrong-exception-operation: wrong-exception-operation / W0716 ================================= **Message emitted:** ``Invalid exception operation. %s`` **Description:** *Used when an operation is done against an exception, but the operation is not valid for the exception in question. Usually emitted when having binary operations between exceptions in except handlers.* **Problematic code:** .. literalinclude:: /data/messages/w/wrong-exception-operation/bad.py :language: python **Correct code:** .. literalinclude:: /data/messages/w/wrong-exception-operation/good.py :language: python Created by the `exceptions `__ checker.