Opened 15 years ago
Closed 14 years ago
#2895 closed enhancement (fixed)
Add ability to attach CPLErrorHandler via C# swig bindings
Reported by: | project10 | Owned by: | tamas |
---|---|---|---|
Priority: | normal | Milestone: | 1.7.0 |
Component: | CSharpBindings | Version: | svn-trunk |
Severity: | normal | Keywords: | csharp CPLSetErrorHandler |
Cc: |
Description
I would like to have the ability to register my own CPLErrorHandler via the C# SWIG bindings. Presumably this would involve passing in an appropriate delegate to a static Gdalconst method, which would in turn invoke CPLSetErrorHandler behind the scenes.
This would be used to read any log messages generated internally to GDAL/OGR - including any at debug levels, assuming that CPL_DEBUG is set appropriately.
I am unsure how this would play with "UseExceptions()", I assume that setting a custom error handler would override the error handler that UseExceptions uses to turn error messages into exceptions.
Attachments (1)
Change History (3)
comment:1 by , 14 years ago
by , 14 years ago
Attachment: | Program.cs added |
---|
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Added this support in r18358 see the usage example attached