Don't attempt to get surrounding text of error when we don't have access to script string anymore.
This commit is contained in:
parent
40745a1935
commit
f1ae0af244
|
@ -33,7 +33,9 @@ namespace Upsilon
|
|||
{
|
||||
if (ThrowsOnError)
|
||||
{
|
||||
var text = ScriptString.GetSpan(location);
|
||||
string text = string.Empty;
|
||||
if (ScriptString != null)
|
||||
text = ScriptString.GetSpan(location);
|
||||
throw new ParseException(FileName, message, location.StartLine, location.StartPosition, text);
|
||||
}
|
||||
Log(DiagnosticLevel.Error, message, location);
|
||||
|
|
Loading…
Reference in New Issue