Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #639 from realityking/exception

Remove ApplicationException in favor of more semantic exception usage.
  • Loading branch information...
commit caeb3e2da1e60ff915805dc683866827d12d2d5b 2 parents 983794d + d0b4e9d
Andrew Eddie eddieajau authored
21 libraries/joomla/application/applicationexception.php
View
@@ -1,21 +0,0 @@
-<?php
-/**
- * @package Joomla.Platform
- * @subpackage Application
- *
- * @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
- * @license GNU General Public License version 2 or later; see LICENSE
- */
-
-defined('JPATH_PLATFORM') or die;
-
-/**
- * Exception class definition for the Application subpackage.
- *
- * @package Joomla.Platform
- * @subpackage Application
- * @since 11.1
- */
-class ApplicationException extends Exception
-{
-}
1  libraries/joomla/application/cli.php
View
@@ -9,7 +9,6 @@
defined('JPATH_PLATFORM') or die;
-jimport('joomla.application.applicationexception');
jimport('joomla.application.input');
jimport('joomla.event.dispatcher');
17 libraries/joomla/application/cli/daemon.php
View
@@ -9,7 +9,6 @@
defined('JPATH_PLATFORM') or die;
-jimport('joomla.application.applicationexception');
jimport('joomla.filesystem.folder');
/**
@@ -100,6 +99,7 @@ class JDaemon extends JApplicationCli
* will be created based on the application's loadDispatcher() method.
*
* @since 11.1
+ * @throws RuntimeException
*/
public function __construct(JInputCli $input = null, JRegistry $config = null, JDispatcher $dispatcher = null)
{
@@ -108,14 +108,14 @@ public function __construct(JInputCli $input = null, JRegistry $config = null, J
if (!defined('SIGHUP'))
{
JLog::add('The PCNTL extension for PHP is not available.', JLog::ERROR);
- throw new ApplicationException;
+ throw new RuntimeException('The PCNTL extension for PHP is not available.');
}
// Verify that POSIX support for PHP is available.
if (!function_exists('posix_getpid'))
{
JLog::add('The POSIX extension for PHP is not available.', JLog::ERROR);
- throw new ApplicationException;
+ throw new RuntimeException('The POSIX extension for PHP is not available.');
}
// @codeCoverageIgnoreEnd
@@ -142,6 +142,7 @@ public function __construct(JInputCli $input = null, JRegistry $config = null, J
*
* @since 11.1
* @see pcntl_signal()
+ * @throws RuntimeException
*/
public static function signal($signal)
{
@@ -152,7 +153,7 @@ public static function signal($signal)
if (!is_subclass_of(static::$instance, 'JDaemon'))
{
JLog::add('Cannot find the application instance.', JLog::EMERGENCY);
- throw new ApplicationException;
+ throw new RuntimeException('Cannot find the application instance.');
}
// Fire the onReceiveSignal event.
@@ -478,7 +479,7 @@ protected function changeIdentity()
* @return boolean
*
* @since 11.1
- * @throws ApplicationException
+ * @throws RuntimeException
*/
protected function daemonize()
{
@@ -499,7 +500,7 @@ protected function daemonize()
{
$this->fork();
}
- catch (ApplicationException $e)
+ catch (RuntimeException $e)
{
JLog::add('Unable to fork.', JLog::EMERGENCY);
return false;
@@ -557,7 +558,7 @@ protected function daemonize()
* @return void
*
* @since 11.1
- * @throws ApplicationException
+ * @throws RuntimeException
*/
protected function fork()
{
@@ -571,7 +572,7 @@ protected function fork()
{
// Error
JLog::add('Process could not be forked.', JLog::WARNING);
- throw new ApplicationException;
+ throw new RuntimeException('Process could not be forked.');
}
// If the pid is positive then we successfully forked, and can close this application.
elseif ($pid)
1  libraries/joomla/application/web.php
View
@@ -9,7 +9,6 @@
defined('JPATH_PLATFORM') or die;
-jimport('joomla.application.applicationexception');
jimport('joomla.application.input');
jimport('joomla.application.web.webclient');
jimport('joomla.environment.uri');
Please sign in to comment.
Something went wrong with that request. Please try again.