[eluser]SerGz[/eluser]
Maybe, it's a bit silly, but does anybody thought about adding exceptions to Codeigniter Config Class(Library). Not sure, it is(will be) a good practice, but i suppose throwing an exception instead of just returning false is better.
For example, if we have something connected with user payments. Usually(?), we'll take some configurable data from codeigniter config files. Imagine, we've done a typical error specifying config index, and CI will return just false, which may cause some logic(!not syntax) error in this software.
One thing that i worry about is that to catch it, we'll have to write everywhere try-catch block, e.g.
Code:
try{
$some_var = $this->config->item('smth_important);
}catch(Exception $e){
// email about this, log exception or whatever you want
die("An error occured".$e->getMessage());
}
and i don't know how to escape this
So, do you think it'll be useful or it's just a dumb idea?