NullSafetyError class
Thrown when loading a CodeUnit whose AST has null-safety errors, if the
ApolloVM was created with nullSafetyChecks: true.
This makes a null-safety mistake fail at resolution time, before any code
runs, instead of surfacing as an ApolloVMNullPointerException partway
through execution — after earlier statements have already had their effects.
Only NullSafetySeverity.error findings raise it; warnings and info remain diagnostic-only (they are still reported through the LSP).
Constructors
-
NullSafetyError(String message, {List<
NullSafetyDiagnostic> findings = const []})
Properties
-
findings
→ List<
NullSafetyDiagnostic> -
The error-severity findings that caused the failure.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace?
-
The stack trace at the point where this error was first thrown.
no setterinherited
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