BloomEnvironmentException class

Exception thrown when environment schema validation fails or a required variable is missing/invalid.

Contains an overall descriptive message and a list of individual errors detailing each failed environment variable requirement.

Example

try {
  BloomEnv.validate(AppConfig());
} on BloomEnvironmentException catch (e) {
  print('Config error: ${e.message}');
  for (final err in e.errors) {
    print(' - $err');
  }
}
Implemented types

Constructors

BloomEnvironmentException(String message, {List<String> errors = const []})
Creates a BloomEnvironmentException with a message and optional errors list.

Properties

errors List<String>
Specific individual validation failure error messages.
final
hashCode int
The hash code for this object.
no setterinherited
message String
Error summary message describing the validation failure.
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