public void ParseError(IErrorData data) { var pos = data.Start; Assert.Throws <FormatException>(() => SymbolAndPowerReader.Read(data.Text, ref pos)); Assert.AreEqual(data.ExpectedEnd, pos); }
public void TryTokenizeError(IErrorData data) { var pos = data.Start; IReadOnlyList <SymbolAndPower> actual; var success = SymbolAndPowerReader.TryRead(data.Text, ref pos, out actual); Assert.AreEqual(false, success); Assert.AreEqual(data.Start, pos); CollectionAssert.AreEqual(null, actual); }
public void TryParseError(IErrorData data) { var pos = data.Start; SymbolAndPower sap; var success = SymbolAndPowerReader.TryRead(data.Text, ref pos, out sap); Assert.AreEqual(false, success); Assert.AreEqual(default(SymbolAndPower), sap); Assert.AreEqual(data.ExpectedEnd, pos); }
internal ErrorMargin(ITextView textView, IErrorData errorData) { _textView = textView; _errorData = errorData; _errorMarginControl = new ErrorMarginControl(); _errorMarginControl.Visibility = Visibility.Collapsed; _errorMarginControl.IgnoreError += OnIgnoreError; _errorMarginControl.IgnoreAllErrors += OnIgnoreAllErrors; _errorData.ErrorThrown += OnErrorThrown; _errorData.ErrorIgnored += OnErrorIgnored; _textView.Closed += OnTextViewClosed; }
public IActionResult Error() { var context = HttpContext.Features.Get <IExceptionHandlerFeature>(); var exception = context?.Error; if (exception is null) { return(NotFound()); } IErrorData error = _exceptionMapper.Map(exception); _logger.LogError(exception, error.Message); var model = new ErrorVM { Message = error.Message, Data = error.Data }; return(StatusCode(error.StatusCode, model)); }
public UnformatableObjectException(string message, List<string> data) : base(message) { dat = new UnfData(data); }
public UnformatableObjectException(string message) : base(message) { dat = null; }
internal ErrorMarginFactory(IErrorData errorData) { _errorData = errorData; }
public ErrorInfo(IScriptFile script, IErrorData parsingError) : this(ErrorType.ParsingError, parsingError.JustWarning ? "Warning" : "Error", parsingError.Message, script.FilePath, parsingError.Line) { }