Fail with more descriptive error when processing message involving inactive coin.

This commit is contained in:
tecnovert committed 2022-10-12 22:37:35 +02:00
1 parent 3ed6781c9f
commit c7bbdc7022
3 files changed
+24 -4

No files matched your search

+7
View File
@@ -25,6 +25,13 @@ class AutomationConstraint(ValueError):
pass
class InactiveCoin(Exception):
def __init__(self, coinid):
self.coinid = coinid
def __str__(self):
return str(self.coinid)
def ensure(v, err_string):
if not v:
raise ValueError(err_string)