Message

abstract class Message(val errorId: ErrorMessageID)

A Message contains all semantic information necessary to easily comprehend what caused the message to be logged. Each message can be turned into a Diagnostic which contains the log level and can later be consumed by a subclass of Reporter. However, the error position is only part of Diagnostic, not Message.

NOTE: you should not persist a message directly, because most messages take an implicit Context and these contexts weigh in at about 4mb per instance. Therefore, persisting these will result in a memory leak.

Instead use the persist method to create an instance that does not keep a reference to these contexts.

Value Params
errorId

a unique id identifying the message, this will later be used to reference documentation online

Companion
object
class Object
trait Matchable
class Any
class CyclicMsg
class NamingMsg
class SyntaxMsg
class TypeMsg
class NotAPath

Value members

Abstract methods

def kind: String

The kind of the error message, e.g. "Syntax" or "Type Mismatch". This will be printed as "$kind Error", "$kind Warning", etc, on the first line of the message.

The kind of the error message, e.g. "Syntax" or "Type Mismatch". This will be printed as "$kind Error", "$kind Warning", etc, on the first line of the message.

Concrete methods

def append(suffix: => String): Message
def appendExplanation(suffix: => String): Message

Does this message have an explanation? This is normally the same as explain.nonEmpty but can be overridden if we need a way to return true without actually calling the explain method.

Does this message have an explanation? This is normally the same as explain.nonEmpty but can be overridden if we need a way to return true without actually calling the explain method.

A message is non-sensical if it contains references to tags. Such tags are inserted by the error diagnostic framework if a message contains references to internally generated error types. Normally we want to suppress error messages referring to types like this because they look weird and are normally follow-up errors to something that was diagnosed before.

A message is non-sensical if it contains references to tags. Such tags are inserted by the error diagnostic framework if a message contains references to internally generated error types. Normally we want to suppress error messages referring to types like this because they look weird and are normally follow-up errors to something that was diagnosed before.

The implicit Context in messages is a large thing that we don't want persisted. This method gets around that by duplicating the message, forcing its msg and explanation vals and dropping the implicit context that was captured in the original message.

The implicit Context in messages is a large thing that we don't want persisted. This method gets around that by duplicating the message, forcing its msg and explanation vals and dropping the implicit context that was captured in the original message.

The message with potential embedded tags

The message with potential embedded tags

override def toString: String
Definition Classes
Any

Concrete fields

The explanation to report. tags are filtered out

The explanation to report. tags are filtered out

lazy val message: String

The message to report. tags are filtered out

The message to report. tags are filtered out