const ATTR_CACHE_LIFESPAN = 151;
const ATTR_RESULT_CACHE_LIFESPAN = 151;
const ATTR_LOAD_REFERENCES = 153;
- const ATTR_THROW_EXCEPTIONS = 155;
const ATTR_DEFAULT_PARAM_NAMESPACE = 156;
const ATTR_QUERY_CACHE = 157;
const ATTR_QUERY_CACHE_LIFESPAN = 158;
case IPF_ORM::ATTR_EXPORT:
case IPF_ORM::ATTR_DECIMAL_PLACES:
case IPF_ORM::ATTR_LOAD_REFERENCES:
- case IPF_ORM::ATTR_THROW_EXCEPTIONS:
case IPF_ORM::ATTR_DEFAULT_PARAM_NAMESPACE:
case IPF_ORM::ATTR_AUTOLOAD_TABLE_CLASSES:
case IPF_ORM::ATTR_MODEL_LOADING:
public function rethrowException(Exception $e, $invoker)
{
$event = new IPF_ORM_Event($this, IPF_ORM_Event::CONN_ERROR);
+ $this->notifyDBListeners('onError', $event);
- $this->notifyDBListeners('preError', $event);
-
$name = 'IPF_ORM_Exception_' . $this->driverName;
-
$exc = new $name($e->getMessage(), (int) $e->getCode());
- if ( ! is_array($e->errorInfo)) {
+ if (!is_array($e->errorInfo)) {
$e->errorInfo = array(null, null, null, null);
}
$exc->processErrorInfo($e->errorInfo);
-
- if ($this->getAttribute(IPF_ORM::ATTR_THROW_EXCEPTIONS)) {
- throw $exc;
- }
-
- $this->notifyDBListeners('postError', $event);
+ throw $exc;
}
public function hasTable($name)
IPF_ORM::ATTR_RESULT_CACHE => null,
IPF_ORM::ATTR_QUERY_CACHE => null,
IPF_ORM::ATTR_LOAD_REFERENCES => true,
- IPF_ORM::ATTR_THROW_EXCEPTIONS => true,
IPF_ORM::ATTR_IDXNAME_FORMAT => "%s_idx",
IPF_ORM::ATTR_SEQNAME_FORMAT => "%s_seq",
IPF_ORM::ATTR_TBLNAME_FORMAT => "%s",