zanarkand
zanarkand copied to clipboard
Improved error handling
We currently just kinda yolo return fmt.Errorf()
or the occasional errors.New()
. A proper set of error types should be used with wrapping to allow users to appropriately respond to different errors. Packet reassembly errors currently can't even be accessed, so that should be addressed too.
In the reassembler's run()
goroutine, using something like Trace
and exposing+documenting appropriate debug flags might be a useful addition. Any reassembler errors are currently built, but not logged, due to the goroutine not having any method for output. Having a global error channel is kinda gross, but may be worthwhile.