Skip to content

Commit

Permalink
Use PError for wrapping script command exceptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
neilcsmith-net committed May 3, 2024
1 parent ee1064b commit 3015f48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.praxislive.core.Call;
import org.praxislive.core.Value;
import org.praxislive.core.types.PError;
import org.praxislive.core.types.PReference;

/**
* An abstract {@link StackFrame} for commands that need to make a stack frame
Expand Down Expand Up @@ -78,7 +77,7 @@ public final StackFrame process(Env env) {
}
env.getPacketRouter().route(call);
} catch (Exception ex) {
result = List.of(PReference.of(ex));
result = List.of(PError.of(ex));
state = State.Error;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.List;
import org.praxislive.core.Call;
import org.praxislive.core.Value;
import org.praxislive.core.types.PReference;
import org.praxislive.core.types.PError;

/**
* Simple subtype of {@link Command} that can be executed and produce a result
Expand Down Expand Up @@ -96,7 +96,7 @@ public StackFrame process(Env env) {
result = command.process(env, namespace, args);
state = State.OK;
} catch (Exception ex) {
result = List.of(PReference.of(ex));
result = List.of(PError.of(ex));
state = State.Error;
}
}
Expand Down

0 comments on commit 3015f48

Please sign in to comment.