public final class TargetLostException extends Exception
Making this an exception instead of a return value forces the user to handle these case explicitely in a try { ... } catch. The following code illustrates how this may be done:
... try { il.delete(start_ih, end_ih); } catch(TargetLostException e) { for (InstructionHandle target : e.getTargets()) { for (InstructionTargeter targeter : target.getTargeters()) { targeter.updateTarget(target, new_target); } } }
InstructionHandle
,
InstructionList
,
InstructionTargeter
,
Serialized FormModifier and Type | Method and Description |
---|---|
InstructionHandle[] |
getTargets() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public InstructionHandle[] getTargets()
Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.