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>
This commit is contained in:
committed by
GitHub
parent
f43edc1ea7
commit
7cbd2eff40
7
lib/models/app_exceptions.dart
Normal file
7
lib/models/app_exceptions.dart
Normal file
@ -0,0 +1,7 @@
|
||||
class TimeProgressInvalidNameException implements Exception {
|
||||
final invalidName;
|
||||
|
||||
TimeProgressInvalidNameException(this.invalidName);
|
||||
|
||||
String errMsg() => "The name of a TimeProgress can't be: $invalidName";
|
||||
}
|
Reference in New Issue
Block a user