More precise tracing
This commit is contained in:
parent
7bd305471c
commit
1bd933cd5a
|
@ -148,7 +148,7 @@ proc handle*(m: MultisteamSelect, conn: Connection) {.async, gcsafe.} =
|
|||
warn "no handlers for ", protocol = ms
|
||||
await conn.write(m.na)
|
||||
except CatchableError as exc:
|
||||
trace "exception occured", exc = exc.msg
|
||||
trace "exception occurred in MultistreamSelect.handle", exc = exc.msg
|
||||
finally:
|
||||
trace "leaving multistream loop"
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ proc handle*(p: PubSubPeer, conn: Connection) {.async.} =
|
|||
await p.handler(p, @[msg])
|
||||
p.recvdRpcCache.put($hexData.hash)
|
||||
except CatchableError as exc:
|
||||
error "exception occured", exc = exc.msg
|
||||
error "exception occurred in PubSubPeer.handle", exc = exc.msg
|
||||
finally:
|
||||
trace "exiting pubsub peer read loop", peer = p.id
|
||||
if not conn.closed():
|
||||
|
@ -100,7 +100,7 @@ proc send*(p: PubSubPeer, msgs: seq[RPCMsg]) {.async.} =
|
|||
encoded = encodedHex
|
||||
|
||||
except CatchableError as exc:
|
||||
trace "exception occured", exc = exc.msg
|
||||
trace "exception occurred in PubSubPeer.send", exc = exc.msg
|
||||
|
||||
proc sendMsg*(p: PubSubPeer,
|
||||
peerId: PeerID,
|
||||
|
|
|
@ -426,7 +426,7 @@ proc readLoop(sconn: SecureConnection, stream: BufferStream) {.async.} =
|
|||
|
||||
await stream.pushTo(msg)
|
||||
except CatchableError as exc:
|
||||
trace "exception occured", exc = exc.msg
|
||||
trace "exception occurred SecureConnection.readLoop", exc = exc.msg
|
||||
finally:
|
||||
if not sconn.closed:
|
||||
await sconn.close()
|
||||
|
|
|
@ -258,7 +258,7 @@ proc start*(s: Switch): Future[seq[Future[void]]] {.async, gcsafe.} =
|
|||
try:
|
||||
await s.upgradeIncoming(conn) # perform upgrade on incoming connection
|
||||
except CatchableError as exc:
|
||||
trace "exception occured", exc = exc.msg
|
||||
trace "exception occurred in Switch.start", exc = exc.msg
|
||||
finally:
|
||||
if not isNil(conn) and not conn.closed:
|
||||
await conn.close()
|
||||
|
|
Loading…
Reference in New Issue