You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
630 B
22 lines
630 B
# (c) Copyright 2020 by Coinkite Inc. This file is part of Coldcard <coldcardwallet.com>
|
|
# and is covered by GPLv3 license found in COPYING.
|
|
#
|
|
# exceptions.py - Exceptions defined by us.
|
|
#
|
|
|
|
# Caution: limited ability in Micropython to override system exceptions.
|
|
|
|
# PSBT / transaction related
|
|
class FatalPSBTIssue(RuntimeError):
|
|
pass
|
|
|
|
class FraudulentChangeOutput(FatalPSBTIssue):
|
|
def __init__(self, out_idx, msg):
|
|
super().__init__('Output #%d: %s' % (out_idx, msg))
|
|
|
|
class IncorrectUTXOAmount(FatalPSBTIssue):
|
|
def __init__(self, in_idx, msg):
|
|
super().__init__('Input #%d: %s' % (in_idx, msg))
|
|
|
|
|
|
# EOF
|
|
|