ValidationException constructor

ValidationException(
  1. String message, [
  2. 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]);