[Gdal-dev] Any possibility of static compile?
Mateusz Loskot
mateusz at loskot.net
Wed Dec 6 09:24:45 EST 2006
Curt, WE7U wrote:
> On Tue, 5 Dec 2006, Curt, WE7U wrote:
>
>> Hopefully it's just a C++ syntax error? This is gdal-1.3.2b2 I'm
>> working with, and the bit of code is:
>>
>>
>> catch (exception *) {
>
> Sorry, the original code had no space between "exception" and "*".
>
> I replaced it with this, stolen from somewhere else in the GDAL code:
>
>
> catch (const std::exception &e) {
>
> It gets further into the compile now. Is the change correct?
>From C++ point of view, yest, it's perfectly correct.
It's not recommended, and it's not needed, to pass and catch
standard exceptions by pointers.
Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
More information about the Gdal-dev
mailing list