CommonFailureMapper class final
Универсальный маппер ошибок, обрабатывающий типовые Dart-исключения.
Преобразует SocketException, TimeoutException, FormatException,
UnsupportedError, ArgumentError, StateError, TypeError и другие
стандартные ошибки в соответствующие Failure. Также обрабатывает ошибки
dart:io через условные импорты PlatformExceptions для совместимости с web.
Используется как «последний рубеж» в цепочке мапперов — ловит всё, что не обработано специализированными мапперами (Dio, Firebase, Drift и т.д.).
См. также: FailureSubMapper, DioFailureMapper, PlatformFailureMapper.
- Implemented types
Constructors
- CommonFailureMapper()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
tryMap(
Object error, [StackTrace? stackTrace]) → Failure? -
Пытается преобразовать
errorв Failure на основе его типа и сообщения.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited