|
| 1 | +import 'package:core/domain/exceptions/app_base_exception.dart'; |
1 | 2 | import 'package:equatable/equatable.dart'; |
2 | 3 |
|
3 | | -class NotFoundInWebSessionException with EquatableMixin implements Exception { |
4 | | - final String? errorMessage; |
| 4 | +class NotFoundInWebSessionException extends AppBaseException |
| 5 | + with EquatableMixin { |
| 6 | + const NotFoundInWebSessionException({String? errorMessage}) |
| 7 | + : super(errorMessage); |
5 | 8 |
|
6 | | - NotFoundInWebSessionException({this.errorMessage}); |
| 9 | + @override |
| 10 | + String get exceptionName => 'NotFoundInWebSessionException'; |
7 | 11 |
|
8 | 12 | @override |
9 | | - List<Object> get props => []; |
| 13 | + List<Object?> get props => [message, exceptionName]; |
10 | 14 | } |
11 | 15 |
|
12 | | -class NotMatchInWebSessionException with EquatableMixin implements Exception { |
13 | | - const NotMatchInWebSessionException(); |
| 16 | +class NotMatchInWebSessionException extends AppBaseException |
| 17 | + with EquatableMixin { |
| 18 | + const NotMatchInWebSessionException() : super('Session data does not match'); |
| 19 | + |
| 20 | + @override |
| 21 | + String get exceptionName => 'NotMatchInWebSessionException'; |
14 | 22 |
|
15 | 23 | @override |
16 | | - List<Object> get props => []; |
| 24 | + List<Object?> get props => [message, exceptionName]; |
17 | 25 | } |
18 | 26 |
|
19 | | -class SaveToWebSessionFailException with EquatableMixin implements Exception { |
20 | | - final String? errorMessage; |
| 27 | +class SaveToWebSessionFailException extends AppBaseException |
| 28 | + with EquatableMixin { |
| 29 | + const SaveToWebSessionFailException({String? errorMessage}) |
| 30 | + : super(errorMessage); |
21 | 31 |
|
22 | | - SaveToWebSessionFailException({this.errorMessage}); |
| 32 | + @override |
| 33 | + String get exceptionName => 'SaveToWebSessionFailException'; |
23 | 34 |
|
24 | 35 | @override |
25 | | - List<Object> get props => []; |
| 36 | + List<Object?> get props => [message, exceptionName]; |
26 | 37 | } |
27 | 38 |
|
28 | | -class CannotOpenNewWindowException implements Exception {} |
| 39 | +class CannotOpenNewWindowException extends AppBaseException { |
| 40 | + const CannotOpenNewWindowException([super.message]); |
| 41 | + |
| 42 | + @override |
| 43 | + String get exceptionName => 'CannotOpenNewWindowException'; |
| 44 | +} |
0 commit comments