mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-11 06:46:10 +00:00
reraise defect in generic exception handler
This commit is contained in:
parent
021e7d6528
commit
e1d18b431b
@ -57,10 +57,11 @@ proc toENode*(a: MultiAddress): Result[ENode, cstring] {.raises: [Defect].} =
|
||||
except CatchableError:
|
||||
# This will reach the error exit path below
|
||||
discard
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
# TODO:
|
||||
# libp2p/crypto/ecnist.nim(118, 20) Error: can raise an unlisted exception: Exception
|
||||
discard
|
||||
# nim-libp2p/libp2p/multiaddress.nim(616, 40) Error: can raise an unlisted exception: Exception
|
||||
if e of Defect:
|
||||
raise (ref Defect)(e)
|
||||
|
||||
return err "Invalid MultiAddress"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user