Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

YamlException

OfficeIMO.Yaml

Namespace
OfficeIMO.Yaml
Assembly
OfficeIMO.Yaml
Source revision
0eef6a5756b9 with working tree changes
Base
Exception
Implements
ISerializable

Raised when YAML input is malformed or cannot be decoded. YamlException.Code is stable across releases and identifies the rule that failed; the message is for people and may change.

Inheritance

  • Exception
  • YamlException

Derived Types

Methods

public OfficeDiagnostic ToDiagnostic() #

Returns the failure as an error OfficeDiagnostic, the form YamlDocument.Diagnostics uses, so a caller can report a file that does not load next to the findings of files that do.

Returns

OfficeDiagnostic

Properties

public string Code { get; } #

Gets the stable error code, one of the YamlErrorCodes values.

public YamlPosition Position { get; } #

Gets where the problem was detected in the decoded text.

public int Line { get; } #

Gets the one-based line where the problem was detected.

public int Column { get; } #

Gets the one-based column where the problem was detected.

public override string Message { get; } #

Gets the message, followed by the offending source line with a caret under the column when the source text was available (input given as a string, memory or file loaded by YamlDocument).