nskinkel / libredsalt

2 stars 1 forks source link

should we standardize err naming convention? #13

Closed nskinkel closed 9 years ago

nskinkel commented 9 years ago

The ModuleName::SomethingErr format is not always followed currently. Sometimes it's something like CryptoSignErr::KeyGen, and sometimes it's more like CryptoSignErr::CryptoSign. I'm wondering how we should handle naming things in a consistent way?

NB: we'll want to make sure that callers can still distinguish between types of errors that occur (e.g. a verification error on byte strings vs. some weird internal error...maybe this means we should be using unreachable!() more?).

dwtj commented 9 years ago

Another thing: we might be able to shorten the enum names themselves, since they are already namespaced. For example, crypto_sign::CryptoSignErr::CryptoSign could become crypto_sign::Err::CryptoSign.

nskinkel commented 9 years ago

Closing this with the answer as "Yes". This will be fixed in either #21 or #22