MCPcopy Create free account
hub / github.com/LFYSec/MScan / Catch

Class Catch

src/main/java/pascal/taie/ir/stmt/Catch.java:33–62  ·  view source on GitHub ↗

Representation of catch exception, e.g., catch (e).

Source from the content-addressed store, hash-verified

31 * Representation of catch exception, e.g., catch (e).
32 */
33public class Catch extends AbstractStmt {
34
35 /**
36 * Reference of the exception object to be caught.
37 */
38 private final Var exceptionRef;
39
40 public Catch(Var exceptionRef) {
41 this.exceptionRef = exceptionRef;
42 }
43
44 public Var getExceptionRef() {
45 return exceptionRef;
46 }
47
48 @Override
49 public Optional<LValue> getDef() {
50 return Optional.of(exceptionRef);
51 }
52
53 @Override
54 public <T> T accept(StmtVisitor<T> visitor) {
55 return visitor.visit(this);
56 }
57
58 @Override
59 public String toString() {
60 return "catch " + exceptionRef;
61 }
62}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected