We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6bbc23f commit 5b5da1bCopy full SHA for 5b5da1b
README.md
@@ -43,6 +43,7 @@ pip install prompt-toolkit
43
44
```python
45
from jsondb import JsonDB
46
+from jsondb.exceptions import TableExistsError, Error
47
48
# Initialize the database
49
db = JsonDB('my_database.json')
@@ -68,9 +69,9 @@ try:
68
69
# Show final data
70
db.show_data('users')
71
-except db.TableExistsError as e:
72
+except TableExistsError as e:
73
print(f"Setup failed because a table already exists: {e}")
-except db.Error as e: # Catch any library-specific error
74
+except Error as e: # Catch any library-specific error
75
print(f"An error occurred with the database: {e}")
76
except Exception as e:
77
print(f"A general error occurred: {e}")
0 commit comments