Interface NormalizationLogger

Normalization logger.

Each handler has a default message provided as well as a lexicon id and arguments. A handler can use the default message or use the lexicon key to look up and localized version of it accordingly.

Hierarchy

  • NormalizationLogger

Implemented by

Methods

Methods

  • Handle a error.

    Halting normalization when this method is called is down to the implementation of the logger. To halt normalization here simply throw an error to be strict.

    Parameters

    • message: string

      The default message.

    • lex: string

      The lexicon id the warning relates to.

    • Optional args: Record<string, string>

      Any arguments used in the warning.

    Returns void

    Throws

    An error if normalization is to halt.

  • Handle a fatal error message.

    Normalization cannot continue if this is reached.

    An error is always thrown indepentently of this method being called.

    Parameters

    • message: string

      The default message.

    • lex: string

      The lexicon id the warning relates to.

    • Optional args: Record<string, string>

      Any arguments used in the warning.

    Returns void

  • Handle a warning.

    Halting normalization when this method is called is down to the implementation. To halt normalization here simply throw an error.

    Parameters

    • message: string

      The default message.

    • lex: string

      The lexicon id the warning relates to.

    • Optional args: Record<string, string>

      Any arguments used in the warning.

    Returns void

    Throws

    An error if normalization is to halt.

Generated using TypeDoc