ErrorCollector

An error reporter that records problems instead of throwing, for IDE-mode parsing. Only the offset-and-length overloads are supported; the line-based ones throw.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Every error and warning recorded so far, in the order they arrived.

Functions

Link copied to clipboard
open override fun error(message: String, sourceName: String?, offset: Int, length: Int)

Report an error.

open override fun error(message: String, sourceName: String?, line: Int, lineSource: String?, lineOffset: Int)

Report an error. The implementing class is free to throw an exception.

Link copied to clipboard
open override fun runtimeError(message: String, sourceName: String?, line: Int, lineSource: String?, lineOffset: Int): EvaluatorException

Creates an EvaluatorException that may be thrown. runtimeErrors, unlike errors, will always terminate the current script.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun warning(message: String, sourceName: String?, offset: Int, length: Int)

Report a warning.

open override fun warning(message: String, sourceName: String?, line: Int, lineSource: String?, lineOffset: Int)

Report a warning. The implementing class may choose to ignore the warning.