blivet
blivet copied to clipboard
error handling consistency
Establish some conventions for error handling, document them, and implement them.
Some ideas:
- don't raise built-in python exceptions like ValueError
- expand blivet.errors as needed
- when to raise an exception versus returning an error code
- return values would make unit testing cleaner/easier than exn regex
- when/whether to log exceptions (before raise -v- in except)
- audit exception messages for clarity/accuracy
- blivet.partitioning could use some improved clarity and accuracy
we need to come up with some nice way how to deal with errors coming from libblockdev too -- they are all GLib.GError with no easy way how to catch them granularly