protected function raiseError($message, Dao $dao = null) { $this->set('error_message', $message); if ($dao && $dao->inTransaction()) { $dao->rollBack(); } return false; }