gdal icon indicating copy to clipboard operation
gdal copied to clipboard

Probably Bug - No error code in ogr2ogr module when Oracle input layer not exist

Open rmarzocchi84 opened this issue 6 years ago • 4 comments

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.

rmarzocchi84 avatar Sep 19 '18 14:09 rmarzocchi84

Any update?

rmarzocchi84 avatar Nov 15 '18 13:11 rmarzocchi84

Perhaps @IvanLucena interested ?

rouault avatar Nov 15 '18 14:11 rouault

CC @fechen123

rouault avatar Feb 09 '22 19:02 rouault

ORA-04043 is the Oracle error code. Are you expecting the GDAL error code? or is "256" the GDAL error code?

fechen123 avatar Feb 09 '22 21:02 fechen123