-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy path_athrow.php
More file actions
44 lines (38 loc) · 1.15 KB
/
_athrow.php
File metadata and controls
44 lines (38 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
declare(strict_types=1);
namespace PHPJava\Kernel\Mnemonics;
use PHPJava\Core\JavaClass;
use PHPJava\Exceptions\UncaughtException;
final class _athrow extends AbstractOperationCode implements OperationCodeInterface
{
use \PHPJava\Kernel\Core\ExceptionTableInspectable;
public function getOperands(): ?Operands
{
parent::getOperands();
if ($this->operands !== null) {
return $this->operands;
}
return $this->operands = new Operands();
}
/**
* @throws UncaughtException
*/
public function execute(): void
{
parent::execute();
$cpInfo = $this->getConstantPool();
/**
* @var JavaClass $objectref
*/
$objectref = $this->popFromOperandStack();
try {
$this->inspectExceptionTable($objectref->getInvoker()->getClassObject());
} catch (\Exception $e) {
throw new UncaughtException(
"Unable to catch {$objectref->getClassName()} exception. " .
'PHPJava has stopped operations. ' .
'You may be running broken Java class. '
);
}
}
}