Skip to content

Commit 14f6185

Browse files
committed
Exceptions should always be printed via repr(), never str()
1 parent 76f6425 commit 14f6185

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/trio-server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ async def http_serve(stream):
229229
if type(event) is h11.Request:
230230
await send_echo_response(wrapper, event)
231231
except Exception as exc:
232-
wrapper.info("Error during response handler:", exc)
232+
wrapper.info("Error during response handler: {!r}".format(exc))
233233
await maybe_send_error_response(wrapper, exc)
234234

235235
if wrapper.conn.our_state is h11.MUST_CLOSE:

0 commit comments

Comments
 (0)