📄 printstacktrace.java
字号:
package jmathlib.toolbox.jmathlib.system;
import jmathlib.core.tokens.Token;
import jmathlib.core.tokens.OperandToken;
import jmathlib.core.tokens.CharToken;
import jmathlib.core.functions.ExternalFunction;
/**An external function for displaying error messages
aborts the current function being processed*/
public class printstacktrace extends ExternalFunction
{
/**write operand to main display then abort processing
@param operand[n] = error messages to display*/
public OperandToken evaluate(Token[] operands)
{
String val = "";
if(operands[0] instanceof CharToken)
{
val = ((CharToken)operands[0]).toString() + "\n";
}
//val += getContextList().getStackTrace();
return new CharToken(val);
}
}
/*
@GROUP
system
@SYNTAX
PrintStackTrace(message)
@DOC
Displays message and the current execution stack trace.
@NOTES
@EXAMPLES
Error("There has been an error")
There has been an error
@SEE
warning, error
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -