We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 727df50 commit 31305e1Copy full SHA for 31305e1
src/cs50/sql.py
@@ -385,13 +385,12 @@ def shutdown_session(exception=None):
385
386
# If constraint violated, return None
387
except sqlalchemy.exc.IntegrityError as e:
388
- self._disconnect()
389
self._logger.debug(termcolor.colored(statement, "yellow"))
390
- e = RuntimeError(e.orig)
+ e = ValueError(e.orig)
391
e.__cause__ = None
392
raise e
393
394
- # If user errror
+ # If user error
395
except (sqlalchemy.exc.OperationalError, sqlalchemy.exc.ProgrammingError) as e:
396
self._disconnect()
397
self._logger.debug(termcolor.colored(statement, "red"))
0 commit comments