PeterPierinakos / vanilla-rustlang-server

Simple, minimal and open source static web server that uses no dependencies.
Apache License 2.0
38 stars 1 forks source link

`.unwrap()`s and `.expect()`s should be replaced with proper error handling and `?` #9

Closed PeterPierinakos closed 2 years ago

PeterPierinakos commented 2 years ago

What is the feature you want to improve or implement? Error-handling in the codebase.

Additional information: Currently, the project heavily relies on the excessive usage of unwraps in the main logic of the code. I believe that we could replace all possible panics in the server with more graceful errors and decrease the use of unwraps.

I'm going to implement this change myself, submitting this issue in order to track the changes happening.

PeterPierinakos commented 2 years ago

This will be on hold until I finish merging zombiepigdragon's PR.

PeterPierinakos commented 2 years ago

Will try to create custom errors and propagate them throughout the server in order to refrain from adding any dependencies.

PeterPierinakos commented 2 years ago

Fixed with #10.