mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 17:27:37 +00:00
add missing error messages (#1696)
This commit is contained in:
parent
17de9f16b8
commit
bab45a9e36
8 changed files with 39 additions and 0 deletions
|
@ -3,6 +3,11 @@ import 'package:cw_core/exceptions.dart';
|
||||||
|
|
||||||
class BitcoinTransactionWrongBalanceException extends TransactionWrongBalanceException {
|
class BitcoinTransactionWrongBalanceException extends TransactionWrongBalanceException {
|
||||||
BitcoinTransactionWrongBalanceException({super.amount}) : super(CryptoCurrency.btc);
|
BitcoinTransactionWrongBalanceException({super.amount}) : super(CryptoCurrency.btc);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return "BitcoinTransactionWrongBalanceException: $amount, $currency";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class BitcoinTransactionNoInputsException extends TransactionNoInputsException {}
|
class BitcoinTransactionNoInputsException extends TransactionNoInputsException {}
|
||||||
|
@ -13,10 +18,20 @@ class BitcoinTransactionNoDustException extends TransactionNoDustException {}
|
||||||
|
|
||||||
class BitcoinTransactionNoDustOnChangeException extends TransactionNoDustOnChangeException {
|
class BitcoinTransactionNoDustOnChangeException extends TransactionNoDustOnChangeException {
|
||||||
BitcoinTransactionNoDustOnChangeException(super.max, super.min);
|
BitcoinTransactionNoDustOnChangeException(super.max, super.min);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return "BitcoinTransactionNoDustOnChangeException: max: $max, min: $min";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class BitcoinTransactionCommitFailed extends TransactionCommitFailed {
|
class BitcoinTransactionCommitFailed extends TransactionCommitFailed {
|
||||||
BitcoinTransactionCommitFailed({super.errorMessage});
|
BitcoinTransactionCommitFailed({super.errorMessage});
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return errorMessage??"unknown error";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class BitcoinTransactionCommitFailedDustChange extends TransactionCommitFailedDustChange {}
|
class BitcoinTransactionCommitFailedDustChange extends TransactionCommitFailedDustChange {}
|
||||||
|
|
|
@ -24,6 +24,11 @@ class TransactionCommitFailed implements Exception {
|
||||||
final String? errorMessage;
|
final String? errorMessage;
|
||||||
|
|
||||||
TransactionCommitFailed({this.errorMessage});
|
TransactionCommitFailed({this.errorMessage});
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return errorMessage??"unknown error";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TransactionCommitFailedDustChange implements Exception {}
|
class TransactionCommitFailedDustChange implements Exception {}
|
||||||
|
|
|
@ -2,4 +2,9 @@ class SetupWalletException implements Exception {
|
||||||
SetupWalletException({required this.message});
|
SetupWalletException({required this.message});
|
||||||
|
|
||||||
final String message;
|
final String message;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -2,4 +2,7 @@ class SetupWalletException implements Exception {
|
||||||
SetupWalletException({required this.message});
|
SetupWalletException({required this.message});
|
||||||
|
|
||||||
final String message;
|
final String message;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => message;
|
||||||
}
|
}
|
|
@ -2,4 +2,7 @@ class WalletRestoreFromKeysException implements Exception {
|
||||||
WalletRestoreFromKeysException({required this.message});
|
WalletRestoreFromKeysException({required this.message});
|
||||||
|
|
||||||
final String message;
|
final String message;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => message;
|
||||||
}
|
}
|
|
@ -2,4 +2,7 @@ class WalletRestoreFromSeedException implements Exception {
|
||||||
WalletRestoreFromSeedException({required this.message});
|
WalletRestoreFromSeedException({required this.message});
|
||||||
|
|
||||||
final String message;
|
final String message;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => message;
|
||||||
}
|
}
|
|
@ -2,4 +2,7 @@ class SetupWalletException implements Exception {
|
||||||
SetupWalletException({required this.message});
|
SetupWalletException({required this.message});
|
||||||
|
|
||||||
final String message;
|
final String message;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => message;
|
||||||
}
|
}
|
|
@ -2,4 +2,6 @@ class WalletRestoreFromKeysException implements Exception {
|
||||||
WalletRestoreFromKeysException({required this.message});
|
WalletRestoreFromKeysException({required this.message});
|
||||||
|
|
||||||
final String message;
|
final String message;
|
||||||
|
|
||||||
|
String toString() => message;
|
||||||
}
|
}
|
Loading…
Reference in a new issue