DeterminateSystems / bootspec-secureboot

MIT License
89 stars 11 forks source link

No more unwraps or expects #5

Open cole-h opened 3 years ago

cole-h commented 3 years ago

Also, there should probably be some better error handling -- would be nice if there was some way to differentiate between fatal and not-so-fatal errors.

Originally posted by @cole-h in https://github.com/DeterminateSystems/bootloader-experimentation/issues/1#issuecomment-898704353


If we have a lot of potentially-non-fatal errors, maybe we could change return signatures to be Result<(), Vec<Error>>, and report all non-fatal errors at the end?

cole-h commented 3 years ago

Another place to check:

This return type is a bit weird. It might be worth looking out for ways to improve this, like an enum of DetectionResult { ExecError, ParseError, Ok } -- but not sure, and definitely not asking you to do it now.

_Originally posted by @grahamc in https://github.com/DeterminateSystems/bootloader-experimentation/pull/1#discussion_r691467819_