proper try .. catch


should i controlling slight throwing errors:



if (isset($this->dbfields[$var])) {
relapse $this->dbfields[$var];
} else {
pitch new fieldnotfoundexception($var);
}


or style:



try {
relapse $this->dbfields[$var];
} locate (exception $e) {
pitch new fieldnotfoundexception($var);
}


...or something else altogether?



quick reason code: $this->dbfields an array. isset() checks non-static set, case, presumably array component exists.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?