Skip to content

Commit 07dbbdf

Browse files
authored
Changeing some Sinppet Code after Review in custom-exception-type.md Snippet
1 parent 7ba455c commit 07dbbdf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

snippets/python/error-handling/custom-exception-type.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ tags: python,error-creation,organisation,utility
66
---
77

88
```py
9-
class ExceptionName(Exception):
9+
class ExceptionName(BaseException):
1010
def __init__(message: str):
1111
super().__init__(message)
1212

1313
# Usage
1414
a: int = 1
1515

16-
if a > 0: #Simple if function
17-
raise ExceptionName('Error Message') #Rasing the Custom Exception
16+
if a > 0:
17+
raise ExceptionName('Error Message')
1818
```

0 commit comments

Comments
 (0)