[Gdal-dev] Exception class(es) in SWIG C# wrapper

Tamas Szekeres szekerest at gmail.com
Mon Mar 5 16:29:13 EST 2007


Richard,

Currently the exception class you get should contain the same message
string as gdal.GetLastErrorMsg() retrieves. Is this the expected
behaviour?


Best regards,

Tamas


2007/3/5, Richard Matsunaga <richard.matsunaga at waypointinfo.com>:
>
>
> Would it be appropriate or possible to insert a GDAL-specific exception
> class into the SWIG wrapper?
>
> This exception would fetch the extended error information from GDAL and
> automatically include this information in the exception message.
>
> I did this in the old hand-rolled GDAL/OGR wrapper. Other than the many
> constructors, it only needs to override the Message property.
>
>
> /// <summary>
> /// Gets the exception message. Includes the GDAL extended error message if
> available.
> /// </summary>
> public override string Message
> {
>     get
>     {
>         return base.Message + "\n" + gdal.GetLastErrorMsg();
>     }
> }
>
>
> Richard
>
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
>



More information about the Gdal-dev mailing list