Permalink
Browse files

Installer Package: db->error removal

  • Loading branch information...
1 parent c09a845 commit 0e9cd02d4624047d3f3a0131a7286433d37064d6 Amy Stephen committed Mar 31, 2012
@@ -1133,14 +1133,6 @@ public function uninstall($id)
$db->setQuery($query);
$db->execute();
- // Check for errors.
- if ($db->getErrorNum())
- {
- JLog::add(JText::_('JLIB_INSTALLER_ERROR_COMP_UNINSTALL_FAILED_DELETE_CATEGORIES'), JLog::WARNING, 'jerror');
- $this->setError($db->getErrorMsg());
- $retval = false;
- }
-
// Clobber any possible pending updates
$update = JTable::getInstance('update');
$uid = $update->find(array('element' => $row->element, 'type' => 'component', 'client_id' => '', 'folder' => ''));
@@ -1423,18 +1415,7 @@ protected function _removeAdminMenus(&$row)
$ids = $db->loadColumn();
// Check for error
- if ($error = $db->getErrorMsg())
- {
- JLog::add(JText::_('JLIB_INSTALLER_ERROR_COMP_REMOVING_ADMIN_MENUS_FAILED'), JLog::WARNING, 'jerror');
-
- if ($error && $error != 1)
- {
- JLog::add($error, JLog::WARNING, 'jerror');
- }
-
- return false;
- }
- elseif (!empty($ids))
+ if (!empty($ids))
{
// Iterate the items to delete each one.
foreach ($ids as $menuid)
@@ -520,7 +520,7 @@ public function uninstall($eid)
}
if (!empty($count))
{
- JError::raiseNotice(500, JText::plural('JLIB_INSTALLER_NOTICE_LANG_RESET_USERS', $count));
+ JLog::add(JText::plural('JLIB_INSTALLER_NOTICE_LANG_RESET_USERS', $count), JLog::NOTICE, 'jerror');
}
// All done!
@@ -306,7 +306,7 @@ public function pushStep($step)
* @return boolean True if successful
*
* @since 11.1
- * @throws Exception
+ * @throws RuntimeException
*/
public function abort($msg = null, $type = null)
{
@@ -388,7 +388,7 @@ public function abort($msg = null, $type = null)
if ($debug)
{
- throw new Exception(JText::_('JLIB_INSTALLER_ABORT_DEBUG') . $msg, 500);
+ throw new RuntimeException('Installation unexpectedly terminated: ' . $msg, 500);
}
return $retval;

0 comments on commit 0e9cd02

Please sign in to comment.