mirror of
https://github.com/corda/corda.git
synced 2025-01-05 20:54:13 +00:00
print informative message if lambda encountered with no host VM
Per a recent bug report in the hello-ios project, we found that bootimage-generator would abort with no explanation if it encountered a lambda invocation and the `-hostvm` option was unspecified. This commit ensures that a helpful message is printed before exiting.
This commit is contained in:
parent
cbcc15bf74
commit
650941cdf5
@ -5140,6 +5140,14 @@ loop:
|
|||||||
PROTECT(t, bootstrapArray);
|
PROTECT(t, bootstrapArray);
|
||||||
|
|
||||||
if (isLambda(t, c->loader(), bootstrapArray, invocation)) {
|
if (isLambda(t, c->loader(), bootstrapArray, invocation)) {
|
||||||
|
if (bc->hostVM == 0) {
|
||||||
|
throwNew(t,
|
||||||
|
GcVirtualMachineError::Type,
|
||||||
|
"lambda expression encountered, but host VM is not "
|
||||||
|
"available; use -hostvm option to bootimage-generator to "
|
||||||
|
"fix this");
|
||||||
|
}
|
||||||
|
|
||||||
JNIEnv* e;
|
JNIEnv* e;
|
||||||
if (bc->hostVM->vtable->AttachCurrentThread(bc->hostVM, &e, 0) == 0) {
|
if (bc->hostVM->vtable->AttachCurrentThread(bc->hostVM, &e, 0) == 0) {
|
||||||
e->vtable->PushLocalFrame(e, 256);
|
e->vtable->PushLocalFrame(e, 256);
|
||||||
|
Loading…
Reference in New Issue
Block a user