Skip to content

Commit 40dd4ea

Browse files
committed
Use the message of the exception instead of using our own.
1 parent c36a29a commit 40dd4ea

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/src/main/cpp/macros.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ JNIEXPORT retType JNICALL BUILD_METHOD(TYPENAME ,name) ( \
4545

4646
#define CATCH_EXCEPTION(RET) \
4747
catch(const zim::ZimFileFormatError& e) { \
48-
throwException(env, "org/kiwix/libzim/ZimFileFormatException", "Zim file format error."); \
48+
throwException(env, "org/kiwix/libzim/ZimFileFormatException", e.what()); \
4949
return RET; \
5050
} catch(const zim::InvalidType& e) { \
51-
throwException(env, "java/lang/Exception", "Invalid type."); \
51+
throwException(env, "java/lang/Exception", e.what()); \
5252
return RET; \
5353
} catch(const zim::EntryNotFound& e) { \
54-
throwException(env, "java/lang/Exception", "Entry Not Found."); \
54+
throwException(env, "java/lang/Exception", e.what()); \
5555
return RET; \
5656
} catch (const std::ios_base::failure& e) { \
5757
throwException(env, "java/io/IOException", e.what()); \

0 commit comments

Comments
 (0)