Baunsgaard opened a new pull request #1019:
URL: https://github.com/apache/systemds/pull/1019
This PR change the output for a user to not print the stack trace in case of
an exception or stop has been called.
example script:
```R
x = 0
for(i in 1:10){
if(i > 4){
stop("I is to high")
}
x = x + i
}
print(x)
```
Before terminal:
```bash
Me:../secret$ ./run.sh
Using existing SystemDS at ../../../systemds
SystemDS Statistics:
Total execution time: 0.003 sec.
Exception in thread "main" org.apache.sysds.runtime.DMLScriptException: I is
to high
at
org.apache.sysds.runtime.instructions.cp.UnaryScalarCPInstruction.processInstruction(UnaryScalarCPInstruction.java:59)
at
org.apache.sysds.runtime.controlprogram.ProgramBlock.executeSingleInstruction(ProgramBlock.java:247)
at
org.apache.sysds.runtime.controlprogram.ProgramBlock.executeInstructions(ProgramBlock.java:204)
at
org.apache.sysds.runtime.controlprogram.BasicProgramBlock.execute(BasicProgramBlock.java:125)
at
org.apache.sysds.runtime.controlprogram.IfProgramBlock.execute(IfProgramBlock.java:106)
at
org.apache.sysds.runtime.controlprogram.ForProgramBlock.execute(ForProgramBlock.java:141)
at
org.apache.sysds.runtime.controlprogram.Program.execute(Program.java:149)
at
org.apache.sysds.api.ScriptExecutorUtils.executeRuntimeProgram(ScriptExecutorUtils.java:87)
at org.apache.sysds.api.DMLScript.execute(DMLScript.java:395)
at org.apache.sysds.api.DMLScript.executeScript(DMLScript.java:244)
at org.apache.sysds.api.DMLScript.main(DMLScript.java:160)
```
now terminal:
```bash
Me:../secret$ ./run.sh
Using existing SystemDS at ../../../systemds
SystemDS Statistics:
Total execution time: 0.003 sec.
An Error Occured : DMLScriptException
I is to high
```
Also if the terminal supports colours, it will print in red:

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]