diff options
author | Hubert Figuiere <hub@figuiere.net> | 2010-07-10 14:50:18 -0700 |
---|---|---|
committer | Hubert Figuiere <hub@figuiere.net> | 2010-07-10 14:50:18 -0700 |
commit | 988ddbd72e74c9beef4ebe5442f82c1805b186da (patch) | |
tree | 28a09cd03437f6db629c8665e85f7c4d97d1ef6d | |
parent | 9875244bc486cf2c67b00f526803ff3acd5e7463 (diff) |
xmp_init(): Initialize can actually throw exception.
-rw-r--r-- | exempi/exempi.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/exempi/exempi.cpp b/exempi/exempi.cpp index 7060447..7b881d6 100644 --- a/exempi/exempi.cpp +++ b/exempi/exempi.cpp @@ -183,13 +183,21 @@ int xmp_get_error() bool xmp_init() { - // no need to initialize anything else. - return SXMPFiles::Initialize(); + RESET_ERROR; + try { + // no need to initialize anything else. + return SXMPFiles::Initialize(); + } + catch(const XMP_Error & e) { + set_error(e); + } + return false; } void xmp_terminate() { + RESET_ERROR; SXMPFiles::Terminate(); } |