private void LogException(ScriptRuntimeException exception) { Site.Error(exception.Span, exception.GetReason()); var parserException = exception as ScriptParserRuntimeException; if (parserException != null) { LogScriptMessages(parserException.ParserMessages); } }