mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-18 10:11:03 +00:00
24 lines
526 B
Dart
24 lines
526 B
Dart
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 }";
|
|
}
|
|
}
|