aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libpyexiv2.cpp8
-rw-r--r--todo1
2 files changed, 8 insertions, 1 deletions
diff --git a/src/libpyexiv2.cpp b/src/libpyexiv2.cpp
index 4bd515e..5c3ecde 100644
--- a/src/libpyexiv2.cpp
+++ b/src/libpyexiv2.cpp
@@ -362,7 +362,13 @@ namespace LibPyExiv2
void translateExiv2Error(Exiv2::Error const& e)
{
// Use the Python 'C' API to set up an exception object
- const char* message = e.what().c_str();
+
+ // Building a C++ string first allows this code to compile with all
+ // versions of libexiv2 (< 0.13 and >= 0.13), because the way exceptions
+ // are handled in libexiv2 was changed in 0.13.
+ const std::string sMessage(e.what());
+ const char* message = sMessage.c_str();
+
// The type of the Python exception depends on the error code
// Warning: this piece of code should be updated in case the error codes
// defined by Exiv2 (file 'src/error.cpp') are changed
diff --git a/todo b/todo
index 31613f7..f6418c6 100644
--- a/todo
+++ b/todo
@@ -1,5 +1,6 @@
todo list
+- Reflect changes from src/error.cpp in libexiv2 to src/libpyexiv2.cpp: new error messages, error codes changed
- Add a 'doc' builder to the SConstruct to build the module's documentation
- Rewrite the exiv2 command-line tool and the test binaries in Python and (Python) scripts to run the same tests that are run to test exiv2
- Write a complete documentation for the binding and it uses