Skip to content

Commit

Permalink
fix XDeclaredButNotUsed warnings (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
tersec committed Dec 5, 2023
1 parent 6142e43 commit 51f1227
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions metrics/chronos_httpserver.nim
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ proc new*(t: typedesc[MetricsHttpServerRef], address: string,
taddress =
try:
initTAddress(address, port)
except TransportAddressError as exc:
except TransportAddressError:
return err("Invalid server address")
var
request =
Expand Down Expand Up @@ -333,21 +333,21 @@ proc new*(t: typedesc[MetricsHttpServerRef], address: string,
var server = MetricsHttpServerRef(data: data)
try:
createThread(server.thread, serveMetricsServer, data)
except Exception as exc:
except Exception:
return err("Unexpected error while spawning metrics server's thread")
except ResourceExhaustedError as exc:
except ResourceExhaustedError:
return err("Unable to spawn metrics server's thread")

server.reqTransp =
try:
fromPipe(request.write)
except CatchableError as exc:
except CatchableError:
return err("Unable to establish communication channel with " &
"metrics server thread")
server.respTransp =
try:
fromPipe(response.read)
except CatchableError as exc:
except CatchableError:
return err("Unable to establish communication channel with " &
"metrics server thread")

Expand Down

0 comments on commit 51f1227

Please sign in to comment.