tlnworker: don't log InvoiceError - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit daef1a8359cc16acd34c8faad7bd91a1061b5b6a DIR parent b99add59c336ef039ae4905287cedc9bf8ef8733 HTML Author: SomberNight <somber.night@protonmail.com> Date: Tue, 10 Dec 2019 03:19:56 +0100 lnworker: don't log InvoiceError lnworker._pay does not need log_exceptions decorator, as we properly await the coroutine Diffstat: M electrum/lnworker.py | 1 - M electrum/util.py | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) --- DIR diff --git a/electrum/lnworker.py b/electrum/lnworker.py t@@ -892,7 +892,6 @@ class LNWallet(LNWorker): if chan.short_channel_id == short_channel_id: return chan - @log_exceptions async def _pay(self, invoice, amount_sat=None, attempts=1) -> bool: lnaddr = self._check_invoice(invoice, amount_sat) payment_hash = lnaddr.paymenthash DIR diff --git a/electrum/util.py b/electrum/util.py t@@ -183,7 +183,9 @@ class BitcoinException(Exception): pass class UserFacingException(Exception): """Exception that contains information intended to be shown to the user.""" -class InvoiceError(Exception): pass + +class InvoiceError(UserFacingException): pass + # Throw this exception to unwind the stack like when an error occurs. # However unlike other exceptions the user won't be informed.