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
Post a Comment