[gdal-dev] Is it possible to "hide" some ERROR messages?

Daniele Romagnoli daniele.romagnoli at geo-solutions.it
Fri Oct 24 08:35:12 EDT 2008


Hi Tom, Vincent,
I'm using GDAL via Java by means of the SWIG bindings.
The error message automatically appears on the console when I call the
gdal.Open(name, accessType) method and GDAL is unable to open the dataset.
Anyway, I have just taken a look on the thread suggested by Vincent and now
I can quiet the errors. Thank you.

Regards,
Daniele


On Fri, Oct 24, 2008 at 1:44 PM, Vincent Schut <schut at sarvision.nl> wrote:

> Daniele,
>
> this thread should give you some hints:
>
> http://lists.osgeo.org/pipermail/gdal-dev/2003-March/000323.html
>
> Regards,
> Vincent.
>
>
> Tom Kazimiers wrote:
>
>> Hi Daniele,
>>
>> were to you get those error message? Since GDAL is a library  it
>> shouldn't come up with thing like this - at least not errors which are
>> shown to the user automatically (like message boxes or std::out prints
>> (I guess). So if your application gets no dataset for a file it will get
>> NULL returned, you can then do with this information what you want -
>> either inform the user about it or not.
>>
>> Bye,
>> Tom
>>
>> Daniele Romagnoli schrieb:
>>
>>
>>> Hi list,
>>> Is it somehow possible to customize/hide some GDAL error messages?
>>> I know error messages are really useful to fix/understand problems.
>>> Anyway, let me expose my use case:
>>>
>>> I simply need to check if I can obtain a Dataset for a file and return
>>> a boolean.
>>> If I get a Dataset, great! Otherwise... no problem. :)
>>> The user won't see messages like this "ERROR 4: `c:\mydataformat.frmt'
>>> not recognised as a supported file format" (although by this way he
>>> will never know why no Dataset has ben acquired).
>>>
>>> Is there some setConfigOption("xxx",) to hide (some) error messages?
>>>
>>> Thank you.
>>> Regards,
>>>
>>> Daniele
>>>
>>>
>>> --
>>> -------------------------------------------------------
>>> Eng. Daniele Romagnoli
>>> Software Engineer
>>>
>>> GeoSolutions S.A.S.
>>> Via Carignoni 51
>>> 55041 Camaiore (LU)
>>> Italy
>>>
>>> phone: +39 0584983027
>>> fax:     +39 0584983027
>>> mob:   +39 328 0559267
>>>
>>>
>>> http://www.geo-solutions.it
>>>
>>> -------------------------------------------------------
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>
>>>
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>>
>>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
-------------------------------------------------------
Eng. Daniele Romagnoli
Software Engineer

GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax:     +39 0584983027
mob:   +39 328 0559267


http://www.geo-solutions.it

-------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20081024/fdafaf34/attachment-0001.html


More information about the gdal-dev mailing list