-
Notifications
You must be signed in to change notification settings - Fork 10
/
exceptions.py
35 lines (24 loc) · 936 Bytes
/
exceptions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# (c) Copyright 2020 by Coinkite Inc. This file is part of Coldcard <coldcardwallet.com>
# and is covered by GPLv3 license found in COPYING.
#
# SPDX-FileCopyrightText: 2018 Coinkite, Inc. <coldcardwallet.com>
# SPDX-License-Identifier: GPL-3.0-only
#
# (c) Copyright 2018 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))
class MultisigOutOfSpace(RuntimeError):
pass
# EOF