stack_wallet/lib/models/exchange/change_now/change_now_response.dart

25 lines
526 B
Dart
Raw Normal View History

2022-08-26 08:11:35 +00:00
enum ChangeNowExceptionType { generic, serializeResponseError }
class ChangeNowException implements Exception {
String errorMessage;
ChangeNowExceptionType type;
ChangeNowException(this.errorMessage, this.type);
@override
String toString() {
return errorMessage;
}
}
class ChangeNowResponse<T> {
late final T? value;
late final ChangeNowException? exception;
ChangeNowResponse({this.value, this.exception});
@override
String toString() {
return "{ error: $exception, value: $value }";
}
}