feat: add arch

This commit is contained in:
Yashar Panahi
2025-08-02 12:31:42 +03:30
parent 59c3091b2f
commit 64c4ebf0f8
12 changed files with 231 additions and 110 deletions
+21
View File
@@ -0,0 +1,21 @@
class AppException implements Exception {
final String message;
final String prefix;
AppException([this.message = 'An unknown error occurred.', this.prefix = '']);
@override
String toString() {
return '$prefix$message';
}
}
class FetchDataException extends AppException {
FetchDataException([String? message])
: super(message ?? 'Error During Communication: ', 'Network Error');
}
class AuthenticationException extends AppException {
AuthenticationException([String? message])
: super(message ?? 'Authentication Failed.', 'Auth Error');
}