mirror of
https://github.com/kiwix/java-libkiwix.git
synced 2025-09-08 14:45:54 -04:00
Use the message of the exception instead of using our own.
This commit is contained in:
parent
c36a29abc4
commit
40dd4ea853
@ -45,13 +45,13 @@ JNIEXPORT retType JNICALL BUILD_METHOD(TYPENAME ,name) ( \
|
||||
|
||||
#define CATCH_EXCEPTION(RET) \
|
||||
catch(const zim::ZimFileFormatError& e) { \
|
||||
throwException(env, "org/kiwix/libzim/ZimFileFormatException", "Zim file format error."); \
|
||||
throwException(env, "org/kiwix/libzim/ZimFileFormatException", e.what()); \
|
||||
return RET; \
|
||||
} catch(const zim::InvalidType& e) { \
|
||||
throwException(env, "java/lang/Exception", "Invalid type."); \
|
||||
throwException(env, "java/lang/Exception", e.what()); \
|
||||
return RET; \
|
||||
} catch(const zim::EntryNotFound& e) { \
|
||||
throwException(env, "java/lang/Exception", "Entry Not Found."); \
|
||||
throwException(env, "java/lang/Exception", e.what()); \
|
||||
return RET; \
|
||||
} catch (const std::ios_base::failure& e) { \
|
||||
throwException(env, "java/io/IOException", e.what()); \
|
||||
|
Loading…
x
Reference in New Issue
Block a user