blivet icon indicating copy to clipboard operation
blivet copied to clipboard

error handling consistency

Open dwlehman opened this issue 10 years ago • 1 comments

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

dwlehman avatar Feb 04 '15 15:02 dwlehman

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

vpodzime avatar Feb 12 '15 15:02 vpodzime