---
source: crates/ruff/src/rules/tryceratops/mod.rs
---
TRY401.py:8:45: TRY401 Redundant exception object included in `logging.exception` call
   |
 8 |         finish()
 9 |     except Exception as ex:
10 |         logger.exception(f"Found an error: {ex}")  # TRY401
   |                                             ^^ TRY401
   |

TRY401.py:19:53: TRY401 Redundant exception object included in `logging.exception` call
   |
19 |         if True is False:
20 |             for i in range(10):
21 |                 logger.exception(f"Found an error: {bad} {good}")  # TRY401
   |                                                     ^^^ TRY401
22 |     except IndexError as bad:
23 |         logger.exception(f"Found an error: {bad} {bad}")  # TRY401
   |

TRY401.py:21:45: TRY401 Redundant exception object included in `logging.exception` call
   |
21 |                 logger.exception(f"Found an error: {bad} {good}")  # TRY401
22 |     except IndexError as bad:
23 |         logger.exception(f"Found an error: {bad} {bad}")  # TRY401
   |                                             ^^^ TRY401
24 |     except Exception as bad:
25 |         logger.exception(f"Found an error: {bad}")  # TRY401
   |

TRY401.py:21:51: TRY401 Redundant exception object included in `logging.exception` call
   |
21 |                 logger.exception(f"Found an error: {bad} {good}")  # TRY401
22 |     except IndexError as bad:
23 |         logger.exception(f"Found an error: {bad} {bad}")  # TRY401
   |                                                   ^^^ TRY401
24 |     except Exception as bad:
25 |         logger.exception(f"Found an error: {bad}")  # TRY401
   |

TRY401.py:23:45: TRY401 Redundant exception object included in `logging.exception` call
   |
23 |         logger.exception(f"Found an error: {bad} {bad}")  # TRY401
24 |     except Exception as bad:
25 |         logger.exception(f"Found an error: {bad}")  # TRY401
   |                                             ^^^ TRY401
26 |         logger.exception(f"Found an error: {bad}")  # TRY401
   |

TRY401.py:24:45: TRY401 Redundant exception object included in `logging.exception` call
   |
24 |     except Exception as bad:
25 |         logger.exception(f"Found an error: {bad}")  # TRY401
26 |         logger.exception(f"Found an error: {bad}")  # TRY401
   |                                             ^^^ TRY401
27 | 
28 |         if True:
   |

TRY401.py:27:49: TRY401 Redundant exception object included in `logging.exception` call
   |
27 |         if True:
28 |             logger.exception(f"Found an error: {bad}")  # TRY401
   |                                                 ^^^ TRY401
   |

TRY401.py:39:47: TRY401 Redundant exception object included in `logging.exception` call
   |
39 |         ...
40 |     except Exception as ex:
41 |         logger.exception(f"Logging an error: {ex}")  # TRY401
   |                                               ^^ TRY401
   |

TRY401.py:46:53: TRY401 Redundant exception object included in `logging.exception` call
   |
46 |         ...
47 |     except Exception as ex:
48 |         logger.exception("Logging an error: " + str(ex))  # TRY401
   |                                                     ^^ TRY401
   |

TRY401.py:53:47: TRY401 Redundant exception object included in `logging.exception` call
   |
53 |         ...
54 |     except Exception as ex:
55 |         logger.exception("Logging an error:", ex)  # TRY401
   |                                               ^^ TRY401
   |


