InvalidException class

Represents an exception that is thrown when an invalid condition is encountered.

This exception contains a list of errors and a message describing the invalid condition. The errors property is an iterable of strings representing the individual errors. The message property is a string representing the overall message of the exception.

Example usage:

try {
  // code that may throw InvalidException
} catch (e) {
  if (e is InvalidException) {
    print(e.message);
    print(e.errors);
  }
}
Implemented types

Constructors

InvalidException(string message, Iterable<String> errors)

Properties

errors Iterable<String>
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

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