Refactoring et amélioration de la création et l'affichage d'un évènement.
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
class ServerException implements Exception {}
|
||||
class ServerException implements Exception {
|
||||
final String message;
|
||||
|
||||
ServerException([this.message = 'Une erreur serveur est survenue']);
|
||||
|
||||
@override
|
||||
String toString() => 'ServerException: $message';
|
||||
}
|
||||
|
||||
class CacheException implements Exception {}
|
||||
|
||||
@@ -10,3 +17,13 @@ class AuthenticationException implements Exception {
|
||||
@override
|
||||
String toString() => 'AuthenticationException: $message';
|
||||
}
|
||||
|
||||
class ServerExceptionWithMessage implements Exception {
|
||||
final String message;
|
||||
|
||||
ServerExceptionWithMessage(this.message);
|
||||
|
||||
@override
|
||||
String toString() => 'ServerException: $message';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user