diff options
Diffstat (limited to 'src/exiv2wrapper.cpp')
-rw-r--r-- | src/exiv2wrapper.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/exiv2wrapper.cpp b/src/exiv2wrapper.cpp index 8c63701..828b13b 100644 --- a/src/exiv2wrapper.cpp +++ b/src/exiv2wrapper.cpp @@ -44,7 +44,7 @@ namespace exiv2wrapper void Image::_instantiate_image() { bool success = true; - int error_code; + Exiv2::Error error(0); // Release the GIL to allow other python threads to run // while opening the file. @@ -54,10 +54,10 @@ void Image::_instantiate_image() { _image = Exiv2::ImageFactory::open(_filename); } - catch (Exiv2::Error& error) + catch (Exiv2::Error& err) { success = false; - error_code = error.code(); + error = err; } // Re-acquire the GIL @@ -70,7 +70,7 @@ void Image::_instantiate_image() } else { - throw Exiv2::Error(error_code, _filename); + throw error; } } |