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