time_progress_tracker/lib/models/app_exceptions.dart
Andreas Fahrecker 7cbd2eff40
Feature/Fix-Invalid-TimeProgress-Name (#3)
Throw Exception when creating time progress with empty or null name.
Handle Exception when user creates new time progress or changes name.

Signed-off-by Andreas Fahrecker <AndreasFahrecker@gmail.com>
2020-11-21 19:57:47 +01:00

8 lines
215 B
Dart

class TimeProgressInvalidNameException implements Exception {
final invalidName;
TimeProgressInvalidNameException(this.invalidName);
String errMsg() => "The name of a TimeProgress can't be: $invalidName";
}