ErrorCode class abstract

An error code associated with an AnalysisError.

Generally, messages should follow the Guide for Writing Diagnostics.

Constructors

ErrorCode({String? correctionMessage, bool hasPublishedDocs = false, bool isUnresolvedIdentifier = false, required String name, required String problemMessage, required String uniqueName})
Initialize a newly created error code to have the given name. The message associated with the error will be created from the given problemMessage template. The correction associated with the error will be created from the given correctionMessage template.
const

Properties

correctionMessage String?
The template used to create the correction to be displayed for this error, or null if there is no correction information for this error. The correction should indicate how the user can fix the error.
no setter
errorSeverity ErrorSeverity
The severity of the error.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasPublishedDocs bool
Return true if diagnostics with this code have documentation for them that has been published.
final
isIgnorable bool
Whether a finding of this error is ignorable via comments such as // ignore: or // ignore_for_file:.
no setter
isUnresolvedIdentifier bool
Whether this error is caused by an unresolved identifier.
final
name String
The name of the error code.
final
numParameters int
no setter
problemMessage String
The template used to create the problem message to be displayed for this error. The problem message should indicate what is wrong and why it is wrong.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type ErrorType
The type of the error.
no setter
uniqueName String
The unique name of this error code.
final
url String?
Return a URL that can be used to access documentation for diagnostics with this code, or null if there is no published documentation.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited