BSHThrowStatement.smali

.class Lbsh/BSHThrowStatement;
.super Lbsh/SimpleNode;


# direct methods
.method constructor <init>(I)V
    .registers 2

    invoke-direct {p0, p1}, Lbsh/SimpleNode;-><init>(I)V

    return-void
.end method


# virtual methods
.method public a(Lbsh/c;Lbsh/Interpreter;)Ljava/lang/Object;
    .registers 5

    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lbsh/BSHThrowStatement;->a(I)Lbsh/Node;

    move-result-object v0

    check-cast v0, Lbsh/SimpleNode;

    invoke-virtual {v0, p1, p2}, Lbsh/SimpleNode;->a(Lbsh/c;Lbsh/Interpreter;)Ljava/lang/Object;

    move-result-object v0

    instance-of v1, v0, Ljava/lang/Exception;

    if-nez v1, :cond_18

    new-instance v0, Lbsh/EvalError;

    const-string/jumbo v1, "Expression in \'throw\' must be Exception type"

    invoke-direct {v0, v1, p0, p1}, Lbsh/EvalError;-><init>(Ljava/lang/String;Lbsh/SimpleNode;Lbsh/c;)V

    throw v0

    :cond_18
    new-instance v1, Lbsh/TargetError;

    check-cast v0, Ljava/lang/Exception;

    invoke-direct {v1, v0, p0, p1}, Lbsh/TargetError;-><init>(Ljava/lang/Throwable;Lbsh/SimpleNode;Lbsh/c;)V

    throw v1
.end method