File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed
Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ Thin Mode Changes
2020#) Added support for writing UTF-8 encoded bytes to CLOB and NCLOB values and
2121 writing strings to BLOB values in order to be consistent with what is done
2222 for string variables.
23+ #) User defined errors raised by the database no longer display an error help
24+ portal URL.
2325#) Fixed potential cursor issues when using DRCP.
2426#) Fixed regression when using IAM token authentication
2527 (`issue 288 <https://github.com/oracle/python-oracledb/issues/288 >`__).
Original file line number Diff line number Diff line change @@ -75,7 +75,11 @@ def _make_adjustments(self):
7575 # add Oracle Database Error Help Portal URL for database error
7676 # messages, but only in thin mode since this is done
7777 # automatically in thick mode with Oracle Client 23c and higher
78- if self .code != 0 and is_thin_mode ():
78+ if (
79+ self .code != 0
80+ and (self .code < 20000 or self .code >= 21000 )
81+ and is_thin_mode ()
82+ ):
7983 self .message = (
8084 self .message
8185 + "\n "
Original file line number Diff line number Diff line change @@ -182,6 +182,22 @@ def test_1707(self):
182182 self .assertIsNone (self .cursor .warning )
183183 self .cursor .execute (f"drop procedure { proc_name } " )
184184
185+ def test_1708 (self ):
186+ "1708 - user defined errors do not generate error help portal URL"
187+ for code in (20000 , 20500 , 20999 ):
188+ with self .assertRaises (oracledb .Error ) as cm :
189+ self .cursor .execute (
190+ f"""
191+ begin
192+ raise_application_error(-{ code } , 'User defined error');
193+ end;
194+ """
195+ )
196+ error_obj = cm .exception .args [0 ]
197+ self .assertEqual (error_obj .code , code )
198+ self .assertEqual (error_obj .full_code , f"ORA-{ code } " )
199+ self .assertTrue ("Help:" not in error_obj .message )
200+
185201
186202if __name__ == "__main__" :
187203 test_env .run_test_cases ()
You can’t perform that action at this time.
0 commit comments