Skip to content

Commit e92efb1

Browse files
committed
エラー修正
1 parent 0b83760 commit e92efb1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

PHPJava/Invoker/JavaMethodInvoker.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,13 @@ public function __call ($methodName, $arguments) {
164164

165165
$name = 'JavaStatement_' . preg_replace('/^MNEMONIC_/', '', $mnemonic->getName($opcode));
166166

167-
require_once dirname(__DIR__) . '/Statements/' . $name . '.php';
167+
$mnemonicExecutor = dirname(__DIR__) . '/Statements/' . $name . '.php';
168+
169+
if (!is_file($mnemonicExecutor)) {
170+
throw new JavaInvokerException('"' . $name . ' (' . sprintf('0x02X', $opcode) . ')" of mnemonic is not implemented. please report this message to administrator.');
171+
}
172+
173+
require_once $mnemonicExecutor;
168174

169175
$statement = new $name($methodName, $this, $byteCodeStream, $stacks, $localstorage, $cpInfo, $attributeData, $pointer);
170176
$returnValue = $statement->execute();

0 commit comments

Comments
 (0)