---
source: crates/ruff_linter/src/rules/tryceratops/mod.rs
---
TRY002 Create your own exception
  --> TRY002.py:13:15
   |
11 |     a = 1
12 |     if a == 1:
13 |         raise Exception("Custom message")
   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 |
15 |     b = 1
   |

TRY002 Create your own exception
  --> TRY002.py:17:15
   |
15 |     b = 1
16 |     if b == 1:
17 |         raise Exception
   |               ^^^^^^^^^
   |

TRY002 Create your own exception
  --> TRY002.py:37:15
   |
35 |     a = 1
36 |     if a == 1:
37 |         raise BaseException("Custom message")
   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 |
39 |     b = 1
   |

TRY002 Create your own exception
  --> TRY002.py:41:15
   |
39 |     b = 1
40 |     if b == 1:
41 |         raise BaseException
   |               ^^^^^^^^^^^^^
   |
