MCPcopy Create free account
hub / github.com/Snapchat/Valdi / newJavaString

Function newJavaString

valdi_core/src/valdi_core/jni/JavaUtils.cpp:279–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277 // surviving. Errors without a code keep using the message-only constructor.
278 const auto errorCode = error.getErrorCode();
279 if (errorCode != 0) {
280 return JavaEnv::getCache().getValdiExceptionClass().newObject(
281 JavaEnv::getCache().getValdiExceptionConstructorWithErrorCodeMethod(),
282 std::move(convertedMessage),
283 errorCode);
284 }
285 return JavaEnv::getCache().getValdiExceptionClass().newObject(
286 JavaEnv::getCache().getValdiExceptionConstructorMethod(), std::move(convertedMessage));
287}
288
289JavaObject toJavaObject(JavaEnv env, const Valdi::Error& error) {
290 return JavaObject(env, newValdiException(env, error));
291}
292
293Throwable toJavaThrowable(JavaEnv env, const Valdi::Error& error) {

Callers 2

toJavaObjectFunction · 0.85
nativeGetStringFunction · 0.85

Calls 7

newJavaStringUTF8Function · 0.85
newJavaStringUTF16Function · 0.85
utf8StringViewMethod · 0.80
utf16StringViewMethod · 0.80
utf16StorageMethod · 0.80
encodingMethod · 0.45
toStringViewMethod · 0.45

Tested by

no test coverage detected