gdal
gdal copied to clipboard
Probably Bug - No error code in ogr2ogr module when Oracle input layer not exist
I recently compiled GDAL 2.3.1, released 2018/06/22 on a Centos Linux System with OCI support.
When I run ogr2ogr from Oracle to PostGIS ogr2ogr works correctly, nevertheless when the input table in Oracle not exist the code write correctly an ERROR message on shell (4 occurrence) but there is no error code. e.g.
ERROR 1: ORA-04043: object SCHEMA_NAME.TABLE_NAME does not exist in OCIDescribeAny ERROR 1: ORA-04043: object SCHEMA_NAME.TABLE_NAME does not exist in OCIDescribeAny ERROR 1: ORA-04043: object "SCHEMA_NAME"."TABLE_NAME" does not exist in OCIDescribeAny ERROR 1: ORA-04043: object "SCHEMA_NAME"."TABLE_NAME" does not exist in OCIDescribeAny
But it do not return any error code
While, if I do for example the same error from PostGIS to PostGIS as expected I see the ERROR message on the shell (only one occurrence) e.g.
ERROR 1: Couldn't fetch requested layer 'SCHEMA_NAME.TABLE_NAME'!
but also an error code (256)
It can be a problem when user need error code for alert running for example a python script with subprocess library or for different applications.
Any update?
Perhaps @IvanLucena interested ?
CC @fechen123
ORA-04043 is the Oracle error code. Are you expecting the GDAL error code? or is "256" the GDAL error code?