ErrorReporter class
An object used to create analysis errors and report then to an error listener.
Constructors
- ErrorReporter.new(AnalysisErrorListener _errorListener, Source _source)
-
Initializes a newly created error reporter that will report errors to the
given
_errorListener
.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- lockLevel ↔ int
-
The lock level, if greater than zero, no errors will be reported.
This is used to prevent reporting errors inside comments.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → Source
-
no setter
Methods
-
atConstructorDeclaration(
ConstructorDeclaration node, ErrorCode errorCode, {List< Object> ? arguments, List<DiagnosticMessage> ? contextMessages, Object? data}) → void -
Report a diagnostic with the given
errorCode
andarguments
. The location of the diagnostic will be the name of thenode
. -
atElement(
Element element, ErrorCode errorCode, {List< Object> ? arguments, List<DiagnosticMessage> ? contextMessages, Object? data}) → void -
Report an error with the given
errorCode
andarguments
. Theelement
is used to compute the location of the error. -
atElement2(
Element2 element2, ErrorCode errorCode, {List< Object> ? arguments, List<DiagnosticMessage> ? contextMessages, Object? data}) → void -
Report an error with the given
errorCode
andarguments
. Theelement
is used to compute the location of the error. -
atEntity(
SyntacticEntity entity, ErrorCode errorCode, {List< Object> ? arguments, List<DiagnosticMessage> ? contextMessages, Object? data}) → void -
Report an error with the given
errorCode
andarguments
. Theentity
is used to compute the location of the error. -
atNode(
AstNode node, ErrorCode errorCode, {List< Object> ? arguments, List<DiagnosticMessage> ? contextMessages, Object? data}) → void -
Report an error with the given
errorCode
andarguments
. Thenode
is used to compute the location of the error. -
atOffset(
{required int offset, required int length, required ErrorCode errorCode, List< Object> ? arguments, List<DiagnosticMessage> ? contextMessages, Object? data}) → void -
Report an error with the given
errorCode
andarguments
. The location of the error is specified by the givenoffset
andlength
. -
atSourceSpan(
SourceSpan span, ErrorCode errorCode, {List< Object> ? arguments, List<DiagnosticMessage> ? contextMessages, Object? data}) → void -
Report an error with the given
errorCode
andarguments
. Thespan
is used to compute the location of the error. -
atToken(
Token token, ErrorCode errorCode, {List< Object> ? arguments, List<DiagnosticMessage> ? contextMessages, Object? data}) → void -
Report an error with the given
errorCode
andarguments
. Thetoken
is used to compute the location of the error. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reportError(
AnalysisError error) → void -
Report the given
error
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited