dotty.tools.dotc.reporting.diagnostic

Message

Related Docs: object Message | package diagnostic

abstract class Message extends AnyRef

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

NOTE: you should not be persisting messages. Most messages take an implicit Context and these contexts weigh in at about 4mb per instance, as such 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.

Self Type
Message
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Message
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Message(errorId: Int)

    errorId

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

Abstract Value Members

  1. abstract def explanation: String

    The explanation should provide a detailed description of why the error occurred and use examples from the user's own code to illustrate how to avoid these errors.

  2. abstract def kind: String

    The kind of the error message is something like "Syntax" or "Type Mismatch"

  3. abstract def msg: String

    The msg contains the diagnostic message e.g:

    The msg contains the diagnostic message e.g:

    > expected: String > found: Int

    This message will be placed underneath the position given by the enclosing MessageContainer

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  8. val errorId: Int

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

  9. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  16. def persist: Message

    The implicit Context in messages is a large thing that we don't want persisted.

    The implicit Context in messages is a large thing that we don't want persisted. This method gets around that by duplicating the message without the implicit context being passed along.

  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. def toString(): String

    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped