Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit 7cc851f

Browse files
Exceptions
1 parent b3100d1 commit 7cc851f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

quickmongo/Exception.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Base Error Class
2+
class QuickMongoError(Exception):
3+
4+
def __init__(self, message: str):
5+
self.message = message
6+
7+
def __str__(self):
8+
return self.message
9+
10+
# Value not int error
11+
class ValueNotIntError(QuickMongoError):
12+
13+
def __init__(self, message: str):
14+
super().__init__(message)
15+
16+
# Invaid event error
17+
class InvalidEventError(QuickMongoError):
18+
19+
def __init__(self, message: str):
20+
super().__init__(message)

0 commit comments

Comments
 (0)