Skip to content

Commit 9a755ed

Browse files
committed
feat: Add error definitions
1 parent 9c4b0bd commit 9a755ed

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

codeforces/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import error

codeforces/error.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class CodeforcesAPIError(Exception):
2+
def __init__(self, comment, method, args):
3+
self.comment = comment
4+
self.method = method
5+
self.method_args = args
6+
7+
super(CodeforcesAPIError, self).__init__(comment)

0 commit comments

Comments
 (0)