| 248 | } |
| 249 | |
| 250 | static djinni::LocalRef<jobject> newValdiException(JavaEnv env, const Valdi::Error& error) { |
| 251 | auto convertedMessage = toJavaObject(env, error.getMessage()); |
| 252 | return JavaEnv::getCache().getValdiExceptionClass().newObject( |
| 253 | JavaEnv::getCache().getValdiExceptionConstructorMethod(), std::move(convertedMessage)); |
| 254 | } |
| 255 | |
| 256 | JavaObject toJavaObject(JavaEnv env, const Valdi::Error& error) { |
| 257 | return JavaObject(env, newValdiException(env, error)); |
no test coverage detected