Closed etan-status closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 82.77%. Comparing base (
6c87348
) to head (29d9c1d
).
@etan-status Could you please explain what LPError
means and why errors should descend from it?
@etan-status Could you please explain what
LPError
means and why errors should descend from it?
LPError
is the root object of libp2p's error hierarchy - this has always been it's original intent.
Thanks, I meant literally, what does the name mean?
Thanks, I meant literally, what does the name mean?
Oh, heh - the LP
prefix was chosen as a shorthand for libp2p, otherwise we'd be writing something like Libp2pError
all over the place :)
I see, maybe P2PError
would be more descriptive?
I see, maybe
P2PError
would be more descriptive?
well, imo p2p is quite generic and LP is a well established convention in nim libp2p, I personally don't see a need to change it, but I'm also don't feel very strongly about it.
It never crossed my mind that LP means libp2p. I believe a comment or docs would be beneficial.
@etan-status Could you please explain what
LPError
means and why errors should descend from it?
It's a followup from #582. LPError
is the root of all nim-libp2p
originated errors. That convention is mostly followed, with very few individual exceptions that are being addressed. Rationale is so that {.async: (raises).}
can be restricted to the parent for the outermost layer.
All errors raised by
nim-libp2p
should descend fromLPError
.YamuxError
was not correctly classified. Proposing it to be a specializedMuxerError
, in line withmplex
andmuxer
errors.