-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User-defined exceptions as ProgrammingError #360
Comments
+1 |
As for whether ORA-20000 should be defined as a |
Another option would be to define a new exception named ApplicationError do deal with user-defined errors. |
I don't think ProgrammingError makes sense for application runtime errors. ApplicationError might be nice, but is the backward compatibility break worth it? |
If ApplicationError is subclass of DatabaseError, this will not break the backward compatibility. |
True enough. If @cjbj has no objections I'll add it to cx_Oracle 8. It will cover the error numbers from -20000 to -20999. |
8.3 doesn't have ApplicationError. Plan is valid to add it? |
I don't see it in the next major version, so we'll have to revisit when we get a moment. |
What kind of database errors are ProgrammingError? If you raise a user-defined exception through the procedure raise_application_error, the cx_Oracle raising an DatabaseError.
I think is more clear use ProgrammingError for user-defined exceptions instead of DatabaseError.
Python Version: 3.7.4
cx_Oracle Version: 7.2.2
oracleinstantclient Version: 12.2
Oracle server Version : 11g XE
SO: Fedora 30
The text was updated successfully, but these errors were encountered: