operator + method
Implementation
BadRequestException operator +(final other) {
if (other is ValidationError) {
return BadRequestException(this.message, [
..._validationErrors!,
other,
]);
} else if (other is Iterable<ValidationError>) {
return BadRequestException(
this.message, [..._validationErrors!, ...other]);
} else if (other is String) {
return BadRequestException(other, _validationErrors);
} else if (other is BadRequestException) {
return BadRequestException(other.message ?? this.message,
[...this._validationErrors!, ...other._validationErrors!]);
} else {
return wrongType("other", other, [Iterable, String, BadRequestException]);
}
}