mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-17 00:47:03 +00:00
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)
|
let tailBlock = get_initial_beacon_block(tailState)
|
||||||
BlockPool.preInit(node.db, tailState, tailBlock)
|
BlockPool.preInit(node.db, tailState, tailBlock)
|
||||||
|
|
||||||
except:
|
except CatchableError as e:
|
||||||
stderr.write "Failed to initialize database\n"
|
stderr.write "Failed to initialize database\n"
|
||||||
stderr.write getCurrentExceptionMsg(), "\n"
|
stderr.write e.msg, "\n"
|
||||||
quit 1
|
quit 1
|
||||||
|
|
||||||
proc addBootstrapNode(node: BeaconNode, bootstrapNode: BootstrapAddr) =
|
proc addBootstrapNode(node: BeaconNode, bootstrapNode: BootstrapAddr) =
|
||||||
|
@ -250,9 +250,9 @@ proc run(conf: InspectorConf) {.async.} =
|
|||||||
info InspectorIdent & " started", peerID = getPeerId(identity.peer, conf),
|
info InspectorIdent & " started", peerID = getPeerId(identity.peer, conf),
|
||||||
bound = identity.addresses,
|
bound = identity.addresses,
|
||||||
options = flags
|
options = flags
|
||||||
except:
|
except CatchableError as e:
|
||||||
error "Could not initialize p2pd daemon",
|
error "Could not initialize p2pd daemon",
|
||||||
exception = getCurrentExceptionMsg()
|
exception = e.msg
|
||||||
quit(1)
|
quit(1)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -265,8 +265,8 @@ proc run(conf: InspectorConf) {.async.} =
|
|||||||
let t = await api.pubsubSubscribe(filter, pubsubLogger)
|
let t = await api.pubsubSubscribe(filter, pubsubLogger)
|
||||||
info "Subscribed to custom topic", topic = filter
|
info "Subscribed to custom topic", topic = filter
|
||||||
subs.add((ticket: t, future: t.transp.join()))
|
subs.add((ticket: t, future: t.transp.join()))
|
||||||
except:
|
except CatchableError as e:
|
||||||
error "Could not subscribe to topics", exception = getCurrentExceptionMsg()
|
error "Could not subscribe to topics", exception = e.msg
|
||||||
quit(1)
|
quit(1)
|
||||||
|
|
||||||
# Starting DHT resolver task
|
# Starting DHT resolver task
|
||||||
|
@ -147,7 +147,7 @@ proc disconnectAndRaise(peer: Peer,
|
|||||||
template reraiseAsPeerDisconnected(peer: Peer, errMsgExpr: static string,
|
template reraiseAsPeerDisconnected(peer: Peer, errMsgExpr: static string,
|
||||||
reason = FaultOrError): auto =
|
reason = FaultOrError): auto =
|
||||||
const errMsg = errMsgExpr
|
const errMsg = errMsgExpr
|
||||||
debug errMsg, err = getCurrentExceptionMsg()
|
debug errMsg
|
||||||
disconnectAndRaise(peer, reason, errMsg)
|
disconnectAndRaise(peer, reason, errMsg)
|
||||||
|
|
||||||
proc registerProtocol(protocol: ProtocolInfo) =
|
proc registerProtocol(protocol: ProtocolInfo) =
|
||||||
|
@ -147,7 +147,7 @@ proc disconnectAndRaise(peer: Peer,
|
|||||||
template reraiseAsPeerDisconnected(peer: Peer, errMsgExpr: static string,
|
template reraiseAsPeerDisconnected(peer: Peer, errMsgExpr: static string,
|
||||||
reason = FaultOrError): auto =
|
reason = FaultOrError): auto =
|
||||||
const errMsg = errMsgExpr
|
const errMsg = errMsgExpr
|
||||||
debug errMsg, err = getCurrentExceptionMsg()
|
debug errMsg
|
||||||
disconnectAndRaise(peer, reason, errMsg)
|
disconnectAndRaise(peer, reason, errMsg)
|
||||||
|
|
||||||
proc registerProtocol(protocol: ProtocolInfo) =
|
proc registerProtocol(protocol: ProtocolInfo) =
|
||||||
|
@ -233,5 +233,6 @@ proc handleInitialStatus(peer: Peer,
|
|||||||
error "Did not get any blocks from peer. Aborting sync."
|
error "Did not get any blocks from peer. Aborting sync."
|
||||||
break
|
break
|
||||||
|
|
||||||
except CatchableError:
|
except CatchableError as e:
|
||||||
warn "Failed to sync with peer", peer, err = getCurrentExceptionMsg()
|
warn "Failed to sync with peer", peer, err = e.msg
|
||||||
|
|
||||||
|
2
vendor/nim-json-rpc
vendored
2
vendor/nim-json-rpc
vendored
@ -1 +1 @@
|
|||||||
Subproject commit b6336cb7257a02a1074aaab7891150f2ecc83fc9
|
Subproject commit fc0665f88a4f24e9f51fe059ad4e943f3eed927e
|
Loading…
x
Reference in New Issue
Block a user