Rhino.ScriptRuntime.ThrowError C# (CSharp) Method

ThrowError() public static method

Equivalent to executing "new Error(message)" from JavaScript.
Equivalent to executing "new Error(message)" from JavaScript.
public static ThrowError ( Context cx, Scriptable scope, string message ) : JavaScriptException
cx Context the current context
scope Scriptable the current scope
message string the message
return JavaScriptException
		public static JavaScriptException ThrowError(Context cx, Scriptable scope, string message)
		{
			int[] linep = new int[] { 0 };
			string filename = Context.GetSourcePositionFromStack(linep);
			Scriptable error = NewBuiltinObject(cx, scope, TopLevel.Builtins.Error, new object[] { message, filename, Sharpen.Extensions.ValueOf(linep[0]) });
			return new JavaScriptException(error, filename, linep[0]);
		}
ScriptRuntime