subroutine.addEdgeAndExplore(etb, handlerStart, HANDLED_EXCEPTION_EDGE); if (Hierarchy.isUniversalExceptionHandler(exceptionHandler.getCatchType())) { sawUniversalExceptionHandler = true;
private void build(MethodGen methodGen) { CodeExceptionGen[] handlerList = methodGen.getExceptionHandlers(); // Map handler start instructions to the actual exception handlers for (CodeExceptionGen exceptionHandler : handlerList) { addExceptionHandler(exceptionHandler); } // For each instruction, determine which handlers it can reach InstructionHandle handle = methodGen.getInstructionList().getStart(); while (handle != null) { int offset = handle.getPosition(); handlerLoop: for (CodeExceptionGen exceptionHandler : handlerList) { int startOfRange = exceptionHandler.getStartPC().getPosition(); int endOfRange = exceptionHandler.getEndPC().getPosition(); if (offset >= startOfRange && offset <= endOfRange) { // This handler is reachable from the instruction addHandler(handle, exceptionHandler); // If this handler handles all exception types // i.e., an ANY handler, or catch(Throwable...), // then no further (lower-priority) // handlers are reachable from the instruction. if (Hierarchy.isUniversalExceptionHandler(exceptionHandler.getCatchType())) { break handlerLoop; } } } handle = handle.getNext(); } }
ObjectType catchType = handler.getCatchType(); if (Hierarchy.isUniversalExceptionHandler(catchType)) { result.addAll(thrownExceptionSet); thrownExceptionSet.clear();
subroutine.addEdgeAndExplore(etb, handlerStart, HANDLED_EXCEPTION_EDGE); if (Hierarchy.isUniversalExceptionHandler(exceptionHandler.getCatchType())) { sawUniversalExceptionHandler = true;
private void build(MethodGen methodGen) { CodeExceptionGen[] handlerList = methodGen.getExceptionHandlers(); // Map handler start instructions to the actual exception handlers for (CodeExceptionGen exceptionHandler : handlerList) { addExceptionHandler(exceptionHandler); } // For each instruction, determine which handlers it can reach InstructionHandle handle = methodGen.getInstructionList().getStart(); while (handle != null) { int offset = handle.getPosition(); handlerLoop: for (CodeExceptionGen exceptionHandler : handlerList) { int startOfRange = exceptionHandler.getStartPC().getPosition(); int endOfRange = exceptionHandler.getEndPC().getPosition(); if (offset >= startOfRange && offset <= endOfRange) { // This handler is reachable from the instruction addHandler(handle, exceptionHandler); // If this handler handles all exception types // i.e., an ANY handler, or catch(Throwable...), // then no further (lower-priority) // handlers are reachable from the instruction. if (Hierarchy.isUniversalExceptionHandler(exceptionHandler.getCatchType())) { break handlerLoop; } } } handle = handle.getNext(); } }
ObjectType catchType = handler.getCatchType(); if (Hierarchy.isUniversalExceptionHandler(catchType)) { result.addAll(thrownExceptionSet); thrownExceptionSet.clear();