Skip to content

Commit

Permalink
added exception base class to SQLiteDB
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcguinness committed Mar 8, 2024
1 parent 7e3c335 commit e90c5d9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/wxflow/sqlitedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

__all__ = ["SQLiteDB"]

class SQLiteDBError(Exception):
"""
Base class for SQLiteDB exceptions.
"""
OperationalError = sqlite3.OperationalError
IntegrityError = sqlite3.IntegrityError

class SQLiteDB:
"""
Expand All @@ -17,8 +23,7 @@ class SQLiteDB:
"""

OperationalError = sqlite3.OperationalError
IntegrityError = sqlite3.IntegrityError
Error = SQLiteDBError

def __init__(self, db_name: str) -> None:
self.db_name = db_name
Expand Down

0 comments on commit e90c5d9

Please sign in to comment.