ValidationException constructor
ValidationException(
- String message, [
- StackTrace? stackTrace
Creates a ValidationException with a message
describing the issue.
Optionally, you can provide a stackTrace
.
Example:
throw ValidationException('Field "name" cannot be empty');
Implementation
ValidationException(this.message, [this.stackTrace]);