TF-1115 Implement catch exception for EmailDataSource
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import 'package:tmail_ui_user/main/exceptions/cache_exception.dart';
|
||||
import 'package:tmail_ui_user/main/exceptions/exception_thrower.dart';
|
||||
|
||||
class CacheExceptionThrower extends ExceptionThrower {
|
||||
|
||||
@override
|
||||
void throwException(dynamic error) {
|
||||
throw UnknownCacheError(message: error.toString());
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@ class RemoteExceptionThrower extends ExceptionThrower {
|
||||
message: errorResponse.description);
|
||||
}
|
||||
} else {
|
||||
throw UnknownError(message: error.toString());
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user