Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
MySQL と PyMySQL を使用して Python アプリケーションを実行していますが、MySQL エラーが発生したときにその番号を知りたいので、それに応じて別のことを実行できるようにしたいと考えています。
try-except ステートメントまたは別の方法でそれを行う方法はありますか?