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>
8 lines
215 B
Dart
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";
|
|
}
|