remove getCurrentExceptionMsg()
This commit is contained in:
parent
e88e559caf
commit
7682a010a9
|
@ -146,9 +146,9 @@ proc commitGenesisState(node: BeaconNode, tailState: BeaconState) =
|
|||
let tailBlock = get_initial_beacon_block(tailState)
|
||||
BlockPool.preInit(node.db, tailState, tailBlock)
|
||||
|
||||
except:
|
||||
except CatchableError as e:
|
||||
stderr.write "Failed to initialize database\n"
|
||||
stderr.write getCurrentExceptionMsg(), "\n"
|
||||
stderr.write e.msg, "\n"
|
||||
quit 1
|
||||
|
||||
proc addBootstrapNode(node: BeaconNode, bootstrapNode: BootstrapAddr) =
|
||||
|
|
|
@ -250,9 +250,9 @@ proc run(conf: InspectorConf) {.async.} =
|
|||
info InspectorIdent & " started", peerID = getPeerId(identity.peer, conf),
|
||||
bound = identity.addresses,
|
||||
options = flags
|
||||
except:
|
||||
except CatchableError as e:
|
||||
error "Could not initialize p2pd daemon",
|
||||
exception = getCurrentExceptionMsg()
|
||||
exception = e.msg
|
||||
quit(1)
|
||||
|
||||
try:
|
||||
|
@ -265,8 +265,8 @@ proc run(conf: InspectorConf) {.async.} =
|
|||
let t = await api.pubsubSubscribe(filter, pubsubLogger)
|
||||
info "Subscribed to custom topic", topic = filter
|
||||
subs.add((ticket: t, future: t.transp.join()))
|
||||
except:
|
||||
error "Could not subscribe to topics", exception = getCurrentExceptionMsg()
|
||||
except CatchableError as e:
|
||||
error "Could not subscribe to topics", exception = e.msg
|
||||
quit(1)
|
||||
|
||||
# Starting DHT resolver task
|
||||
|
|
|
@ -147,7 +147,7 @@ proc disconnectAndRaise(peer: Peer,
|
|||
template reraiseAsPeerDisconnected(peer: Peer, errMsgExpr: static string,
|
||||
reason = FaultOrError): auto =
|
||||
const errMsg = errMsgExpr
|
||||
debug errMsg, err = getCurrentExceptionMsg()
|
||||
debug errMsg
|
||||
disconnectAndRaise(peer, reason, errMsg)
|
||||
|
||||
proc registerProtocol(protocol: ProtocolInfo) =
|
||||
|
|
|
@ -147,7 +147,7 @@ proc disconnectAndRaise(peer: Peer,
|
|||
template reraiseAsPeerDisconnected(peer: Peer, errMsgExpr: static string,
|
||||
reason = FaultOrError): auto =
|
||||
const errMsg = errMsgExpr
|
||||
debug errMsg, err = getCurrentExceptionMsg()
|
||||
debug errMsg
|
||||
disconnectAndRaise(peer, reason, errMsg)
|
||||
|
||||
proc registerProtocol(protocol: ProtocolInfo) =
|
||||
|
|
|
@ -233,5 +233,6 @@ proc handleInitialStatus(peer: Peer,
|
|||
error "Did not get any blocks from peer. Aborting sync."
|
||||
break
|
||||
|
||||
except CatchableError:
|
||||
warn "Failed to sync with peer", peer, err = getCurrentExceptionMsg()
|
||||
except CatchableError as e:
|
||||
warn "Failed to sync with peer", peer, err = e.msg
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit b6336cb7257a02a1074aaab7891150f2ecc83fc9
|
||||
Subproject commit fc0665f88a4f24e9f51fe059ad4e943f3eed927e
|
Loading…
Reference in New Issue