Skip to content

Commit

Permalink
Fixes unhelpful errors in loadfile functions. #107
Browse files Browse the repository at this point in the history
  • Loading branch information
xanathar committed Sep 23, 2015
1 parent 3875291 commit 4d17749
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MoonSharp.Interpreter/CoreLib/LoadModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ private static DynValue loadfile_impl(ScriptExecutionContext executionContext, C
}
catch (SyntaxErrorException ex)
{
return DynValue.NewTuple(DynValue.Nil, DynValue.NewString(ex.Message));
return DynValue.NewTuple(DynValue.Nil, DynValue.NewString(ex.DecoratedMessage ?? ex.Message));
}
}

Expand Down

0 comments on commit 4d17749

Please sign in to comment.