本文整理了Java中org.mozilla.javascript.Context.getSourcePositionFromStack()
方法的一些代码示例,展示了Context.getSourcePositionFromStack()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.getSourcePositionFromStack()
方法的具体详情如下:
包路径:org.mozilla.javascript.Context
类名称:Context
方法名:getSourcePositionFromStack
暂无
代码示例来源:origin: rhino/js
/**
* Report a warning using the error reporter for the current thread.
*
* @param message the warning message to report
* @see org.mozilla.javascript.ErrorReporter
*/
public static void reportWarning(String message)
{
int[] linep = { 0 };
String filename = getSourcePositionFromStack(linep);
Context.reportWarning(message, filename, linep[0], null, 0);
}
代码示例来源:origin: rhino/js
public static void reportWarning(String message, Throwable t)
{
int[] linep = { 0 };
String filename = getSourcePositionFromStack(linep);
Writer sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
pw.println(message);
t.printStackTrace(pw);
pw.flush();
Context.reportWarning(sw.toString(), filename, linep[0], null, 0);
}
代码示例来源:origin: rhino/js
/**
* Report an error using the error reporter for the current thread.
*
* @param message the error message to report
* @see org.mozilla.javascript.ErrorReporter
*/
public static void reportError(String message)
{
int[] linep = { 0 };
String filename = getSourcePositionFromStack(linep);
Context.reportError(message, filename, linep[0], null, 0);
}
代码示例来源:origin: rhino/js
public static EcmaError constructError(String error, String message)
{
int[] linep = new int[1];
String filename = Context.getSourcePositionFromStack(linep);
return constructError(error, message, filename, linep[0], null, 0);
}
代码示例来源:origin: rhino/js
/**
* Report a runtime error using the error reporter for the current thread.
*
* @param message the error message to report
* @see org.mozilla.javascript.ErrorReporter
*/
public static EvaluatorException reportRuntimeError(String message)
{
int[] linep = { 0 };
String filename = getSourcePositionFromStack(linep);
return Context.reportRuntimeError(message, filename, linep[0], null, 0);
}
代码示例来源:origin: ro.isdc.wro4j/rhino
public static void reportWarning(String message, Throwable t)
{
int[] linep = { 0 };
String filename = getSourcePositionFromStack(linep);
Writer sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
pw.println(message);
t.printStackTrace(pw);
pw.flush();
Context.reportWarning(sw.toString(), filename, linep[0], null, 0);
}
代码示例来源:origin: ro.isdc.wro4j/rhino
/**
* Report an error using the error reporter for the current thread.
*
* @param message the error message to report
* @see org.mozilla.javascript.ErrorReporter
*/
public static void reportError(String message)
{
int[] linep = { 0 };
String filename = getSourcePositionFromStack(linep);
Context.reportError(message, filename, linep[0], null, 0);
}
代码示例来源:origin: ro.isdc.wro4j/rhino
public static EcmaError constructError(String error,
String message,
int lineNumberDelta)
{
int[] linep = new int[1];
String filename = Context.getSourcePositionFromStack(linep);
if (linep[0] != 0) {
linep[0] += lineNumberDelta;
}
return constructError(error, message, filename, linep[0], null, 0);
}
代码示例来源:origin: geogebra/geogebra
/**
* Report a warning using the error reporter for the current thread.
*
* @param message the warning message to report
* @see org.mozilla.javascript.ErrorReporter
*/
public static void reportWarning(String message)
{
int[] linep = { 0 };
String filename = getSourcePositionFromStack(linep);
Context.reportWarning(message, filename, linep[0], null, 0);
}
代码示例来源:origin: geogebra/geogebra
public static void reportWarning(String message, Throwable t)
{
int[] linep = { 0 };
String filename = getSourcePositionFromStack(linep);
Writer sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
pw.println(message);
t.printStackTrace(pw);
pw.flush();
Context.reportWarning(sw.toString(), filename, linep[0], null, 0);
}
代码示例来源:origin: geogebra/geogebra
/**
* Report an error using the error reporter for the current thread.
*
* @param message the error message to report
* @see org.mozilla.javascript.ErrorReporter
*/
public static void reportError(String message)
{
int[] linep = { 0 };
String filename = getSourcePositionFromStack(linep);
Context.reportError(message, filename, linep[0], null, 0);
}
代码示例来源:origin: geogebra/geogebra
/**
* Report a runtime error using the error reporter for the current thread.
*
* @param message the error message to report
* @see org.mozilla.javascript.ErrorReporter
*/
public static EvaluatorException reportRuntimeError(String message)
{
int[] linep = { 0 };
String filename = getSourcePositionFromStack(linep);
return Context.reportRuntimeError(message, filename, linep[0], null, 0);
}
代码示例来源:origin: geogebra/geogebra
public static EcmaError constructError(String error, String message)
{
int[] linep = new int[1];
String filename = Context.getSourcePositionFromStack(linep);
return constructError(error, message, filename, linep[0], null, 0);
}
代码示例来源:origin: geogebra/geogebra
public static EcmaError constructError(String error,
String message,
int lineNumberDelta)
{
int[] linep = new int[1];
String filename = Context.getSourcePositionFromStack(linep);
if (linep[0] != 0) {
linep[0] += lineNumberDelta;
}
return constructError(error, message, filename, linep[0], null, 0);
}
代码示例来源:origin: rhino/js
public static EcmaError constructError(String error,
String message,
int lineNumberDelta)
{
int[] linep = new int[1];
String filename = Context.getSourcePositionFromStack(linep);
if (linep[0] != 0) {
linep[0] += lineNumberDelta;
}
return constructError(error, message, filename, linep[0], null, 0);
}
代码示例来源:origin: io.apigee/rhino
public static EcmaError constructError(String error, String message)
{
int[] linep = new int[1];
String filename = Context.getSourcePositionFromStack(linep);
return constructError(error, message, filename, linep[0], null, 0);
}
代码示例来源:origin: io.apigee/rhino
/**
* Report a warning using the error reporter for the current thread.
*
* @param message the warning message to report
* @see org.mozilla.javascript.ErrorReporter
*/
public static void reportWarning(String message)
{
int[] linep = { 0 };
String filename = getSourcePositionFromStack(linep);
Context.reportWarning(message, filename, linep[0], null, 0);
}
代码示例来源:origin: com.sun.phobos/phobos-rhino
public static void reportWarning(String message, Throwable t)
{
int[] linep = { 0 };
String filename = getSourcePositionFromStack(linep);
Writer sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
pw.println(message);
t.printStackTrace(pw);
pw.flush();
Context.reportWarning(sw.toString(), filename, linep[0], null, 0);
}
代码示例来源:origin: com.github.tntim96/rhino
public static EcmaError constructError(String error,
String message,
int lineNumberDelta)
{
int[] linep = new int[1];
String filename = Context.getSourcePositionFromStack(linep);
if (linep[0] != 0) {
linep[0] += lineNumberDelta;
}
return constructError(error, message, filename, linep[0], null, 0);
}
代码示例来源:origin: io.apigee/rhino
public static EcmaError constructError(String error,
String message,
int lineNumberDelta)
{
int[] linep = new int[1];
String filename = Context.getSourcePositionFromStack(linep);
if (linep[0] != 0) {
linep[0] += lineNumberDelta;
}
return constructError(error, message, filename, linep[0], null, 0);
}
内容来源于网络,如有侵权,请联系作者删除!