[JVM Packages] Catch dmlc error by ref. (#5678)
This commit is contained in:
parent
83981a9ce3
commit
dd9aeb60ae
@ -151,7 +151,7 @@ XGB_EXTERN_C int XGBoost4jCallbackDataIterNext(
|
|||||||
global_jvm->DetachCurrentThread();
|
global_jvm->DetachCurrentThread();
|
||||||
}
|
}
|
||||||
return ret_value;
|
return ret_value;
|
||||||
} catch(dmlc::Error e) {
|
} catch(dmlc::Error const& e) {
|
||||||
// only detach if it is a async call.
|
// only detach if it is a async call.
|
||||||
if (jni_status == JNI_EDETACHED) {
|
if (jni_status == JNI_EDETACHED) {
|
||||||
global_jvm->DetachCurrentThread();
|
global_jvm->DetachCurrentThread();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user