class_docstr: Raised when a YAML file can not be parsed properly due to a syntax error.
code: def __str__(self) -> Text:
      if self.filename:
          exception_text = f"Failed to read '{self.filename}'."
      else:
          exception_text = "Failed to read YAML."
  
      if self.underlying_yaml_exception:
          if isinstance(
              self.underlying_yaml_exception,
              (
                  MarkedYAMLError,
                  MarkedYAMLWarning,
                  MarkedYAMLFutureWarning,
              ),
          ):
              self.underlying_yaml_exception.note = None
          if isinstance(
              self.underlying_yaml_exception,
              (MarkedYAMLWarning, MarkedYAMLFutureWarning),
          ):
              self.underlying_yaml_exception.warn = None
          exception_text += f" {self.underlying_yaml_exception}"
  
      if self.filename:
          exception_text = exception_text.replace(
              'in "<unicode string>"', f'in "{self.filename}"'
          )
  
      exception_text += (
          "\n\nYou can use https://yamlchecker.com/ to validate the "
          "YAML syntax of your file."
      )
      return exception_text
  
imports: import json
  from typing import Optional, Text
  import jsonschema
  from ruamel.yaml.error import MarkedYAMLError, MarkedYAMLWarning, MarkedYAMLFutureWarning
label_desc: Use image node_id 2 for calling the YamlSyntaxException obj's underlying member method code with example usage: obj.__str__() and returns: exception_text