On Fri, Jul 29, 2011 at 2:25 PM, Howard Butler <[email protected]> wrote: > > > On Jul 29, 2011, at 2:31 PM, Sean Gillies <[email protected]> wrote: > >> On Fri, Jul 29, 2011 at 12:19 PM, Michael Weisman <[email protected]> wrote: >>> Hi all, >>> First of all, I realize that WorldMill hasn't been touched since 2007 or >>> something and this issue may never be fixed. >>> I am writing a command line utility that scans a directory of files with >>> WorldMill to generate metadata from the schemas and geometries. If a >>> workspace is created with a file that cannot be read by OGR, I get warnings >>> about null pointers in OGR_DS_GetLayerCount and OGR_DS_Destroy (ERROR 10: >>> Pointer 'hDS' is NULL in 'OGR_DS_GetLayerCount' and ERROR 10: Pointer 'hDS' >>> is NULL in 'OGR_DS_Destroy') sent to stdout, and therefore onto the user's >>> console. Is there any way to silence these warnings as they are mostly >>> harmless for my uses, but somewhat scary for end users? > > With a relatively recent (>1.6) OGR: > > ogr.UseExceptions()
Ah, right, but since Worldmill uses the C API and not ogr.py, it means a call (using ctypes) to CPLSetErrorHandler. -- Sean _______________________________________________ Community mailing list [email protected] http://lists.gispython.org/mailman/listinfo/community
