public static void DumpException(AphidLoadScriptException exception, AphidInterpreter interpreter) { WriteErrorMessage( StyleEscape( ErrorFormatter.Format( exception, AphidScript.Read(exception.ScriptFile)))); DumpStackTrace(interpreter, exception); DumpScope(exception, interpreter); }
public static string Format(AphidLoadScriptException exception, string code) { var sb = new StringBuilder("Load script exception\r\n"); var t = exception.LoadScriptExceptionType; sb.AppendLine( t == AphidExceptionType.ParserException ? Format(exception.ParserException, code) : t == AphidExceptionType.AphidRuntimeException ? Format(exception.AphidRuntimeException) : Format(exception.InnerException)); return(sb.ToString()); }
public void DumpExceptionTest02(AphidLoadScriptException exception, AphidInterpreter interpreter) { AphidCli.DumpException(exception, interpreter); // TODO: add assertions to method AphidCliTest.DumpExceptionTest02(AphidLoadScriptException, AphidInterpreter) }