summaryrefslogtreecommitdiffstats
path: root/Doc/includes
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/includes')
-rw-r--r--Doc/includes/sqlite3/complete_statement.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/includes/sqlite3/complete_statement.py b/Doc/includes/sqlite3/complete_statement.py
index cd38d73..a5c9479 100644
--- a/Doc/includes/sqlite3/complete_statement.py
+++ b/Doc/includes/sqlite3/complete_statement.py
@@ -24,7 +24,10 @@ while True:
if buffer.lstrip().upper().startswith("SELECT"):
print(cur.fetchall())
except sqlite3.Error as e:
- print("An error occurred:", e.args[0])
+ err_msg = str(e)
+ err_code = e.sqlite_errorcode
+ err_name = e.sqlite_errorname
+ print(f"{err_name} ({err_code}): {err_msg}")
buffer = ""
con.close()