Class MarkedYamlEngineException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ComposerException, ConstructorException, ParserException, ScannerException

public class MarkedYamlEngineException extends YamlEngineException
Parsing exception when the marks are available
See Also:
  • Field Details

    • context

      private final String context
    • contextMark

      private final Optional<Mark> contextMark
    • problem

      private final String problem
    • problemMark

      private final Optional<Mark> problemMark
  • Constructor Details

    • MarkedYamlEngineException

      protected MarkedYamlEngineException(String context, Optional<Mark> contextMark, String problem, Optional<Mark> problemMark, Throwable cause)
      Create
      Parameters:
      context - - the context of the problem
      contextMark - - position of the context
      problem - - the issue
      problemMark - - position of the issue
      cause - - exception which was thrown
    • MarkedYamlEngineException

      protected MarkedYamlEngineException(String context, Optional<Mark> contextMark, String problem, Optional<Mark> problemMark)
      Create
      Parameters:
      context - - the context of the problem
      contextMark - - position of the context
      problem - - the issue
      problemMark - - position of the issue
  • Method Details

    • getMessage

      public String getMessage()
      Getter
      Overrides:
      getMessage in class Throwable
      Returns:
      the problem
    • toString

      public String toString()
      get readable error
      Overrides:
      toString in class Throwable
      Returns:
      readable problem
    • getContext

      public String getContext()
      getter
      Returns:
      context of the error
    • getContextMark

      public Optional<Mark> getContextMark()
      getter
      Returns:
      position of the context of the error
    • getProblem

      public String getProblem()
      getter
      Returns:
      the issue
    • getProblemMark

      public Optional<Mark> getProblemMark()
      getter
      Returns:
      position of the issue