|
Boost Users : |
Subject: Re: [Boost-users] Standard error handler in gil jpeg_io extension calls exit()
From: Robert Franke (franke.rob_at_[hidden])
Date: 2010-02-02 10:48:01
Hi Peter,
Digging a bit deeper, I found, that this is because in
> boost/gil/extension/io/jpeg_io_private.hpp the jpeg_reader::init()
> function uses the standard error handler:
>
> _cinfo.err=jpeg_std_error(&_jerr);
>
> which calls the exit() function. I'd prefer to have an exception and
> handle the exception in my main program rather than in the library.
>
> Is there a way to do that? To me it seems there's no other way than
> modifying the jpeg_io_extension. Or am I missing something?
>
some time ago I was faced with the same problem and modified
gil/extension/io/jpeg_io_private.hpp to throw an exception in that case.
I am not sure, but maybe it is worth trying to get this into boost?
Cheers,
Robert
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net