unitycoders / uc_pircbotx

A bot for #unity-coders using pircbotx
GNU General Public License v3.0
3 stars 2 forks source link

Exception consistency #56

Closed SuborbitalPigeon closed 9 years ago

SuborbitalPigeon commented 9 years ago

Some methods throw, and others handle errors. We need to decide where stuff should be handled, then do this.

SuborbitalPigeon commented 9 years ago

It boils down to this: handle SQLExceptions in the models, or pass these up to the command code. I think they should be handled at the model level, because it would hide the fact we're using SQLite from the other "controller" code. Any thoughts?

SuborbitalPigeon commented 9 years ago

Note to self: all SQL methods should return something. A boolean to indicate failure; or an object when it's a get() style method (returning either a valid object or null to indicate failure).

webpigeon commented 9 years ago

I agree it would be best to hide anything sqlite sepsific in the model layer :)