|
@@ -332,6 +332,7 @@ namespace Jint.Runtime
|
|
|
catch (JavaScriptException e)
|
|
|
{
|
|
|
c = new Completion(Completion.Throw, e.Error, null);
|
|
|
+ c.Location = withStatement.Location;
|
|
|
}
|
|
|
finally
|
|
|
{
|
|
@@ -409,11 +410,13 @@ namespace Jint.Runtime
|
|
|
{
|
|
|
var c = new Completion(Completion.Normal, null, null);
|
|
|
Completion sl = c;
|
|
|
+ Statement s = null;
|
|
|
|
|
|
try
|
|
|
{
|
|
|
foreach (var statement in statementList)
|
|
|
{
|
|
|
+ s = statement;
|
|
|
c = ExecuteStatement(statement);
|
|
|
if (c.Type != Completion.Normal)
|
|
|
{
|
|
@@ -425,7 +428,9 @@ namespace Jint.Runtime
|
|
|
}
|
|
|
catch(JavaScriptException v)
|
|
|
{
|
|
|
- return new Completion(Completion.Throw, v.Error, null);
|
|
|
+ c = new Completion(Completion.Throw, v.Error, null);
|
|
|
+ c.Location = s.Location;
|
|
|
+ return c;
|
|
|
}
|
|
|
|
|
|
return new Completion(c.Type, c.GetValueOrDefault(), c.Identifier);
|
|
@@ -439,7 +444,9 @@ namespace Jint.Runtime
|
|
|
public Completion ExecuteThrowStatement(ThrowStatement throwStatement)
|
|
|
{
|
|
|
var exprRef = _engine.EvaluateExpression(throwStatement.Argument);
|
|
|
- return new Completion(Completion.Throw, _engine.GetValue(exprRef), null);
|
|
|
+ Completion c = new Completion(Completion.Throw, _engine.GetValue(exprRef), null);
|
|
|
+ c.Location = throwStatement.Location;
|
|
|
+ return c;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|