Opened 9 years ago
Closed 9 years ago
#6075 closed defect (fixed)
gdal.OpenEx() ignores gdal.UseExceptions()
Reported by: | cdestigter | Owned by: | hobu |
---|---|---|---|
Priority: | normal | Milestone: | 2.1.0 |
Component: | PythonBindings | Version: | svn-trunk |
Severity: | normal | Keywords: | |
Cc: | antonio |
Description
gdal.OpenEx('bogus.filename')
doesn't trigger an exception, even if gdal.GetUseExceptions() == 1
Change History (4)
comment:1 by , 9 years ago
Cc: | added |
---|
comment:2 by , 9 years ago
comment:3 by , 9 years ago
Thanks, I'll add that flag.
IMHO making UseExceptions()
set OF_VERBOSE_ERROR
would be ideal :)
comment:4 by , 9 years ago
Milestone: | → 2.1.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
trunk r29716 "Python bindings: make gdal.OpenEx() throw a Python exception in case of failed open when exceptions are enables with gdal.UseExceptions() (#6075)"
Note:
See TracTickets
for help on using tickets.
With gdal.OpenEx() verbose errors have to be explicitly asked with gdal.OpenEx(filename, gdal.OF_VERBOSE_ERROR), and when UseExceptions() is set, this will cause the exception to be triggered.
I've a local patch that if GetUseExceptions() is set will also set gdal.OF_VERBOSE_ERROR, so that an exception is automatically thrown, but I'm somewhat ambivalent about it. Opinions welcome.