Fix name of the \Mibew\RequestProcessor\ProcessorException class

This commit is contained in:
Dmitriy Simushev 2014-01-15 09:45:34 +00:00
parent 10b8d4b2e4
commit 12f5b7dbd3
5 changed files with 9 additions and 9 deletions

View File

@ -20,7 +20,7 @@ namespace Mibew\RequestProcessor\Exception;
/** /**
* Class for {@link \Mibew\RequestProcessor\InviteRequestProcessor} exceptions * Class for {@link \Mibew\RequestProcessor\InviteRequestProcessor} exceptions
*/ */
class InviteProcessorException extends RequestProcessorException { class InviteProcessorException extends ProcessorException {
/** /**
* Operator is not logged in * Operator is not logged in
*/ */

View File

@ -18,9 +18,9 @@
namespace Mibew\RequestProcessor\Exception; namespace Mibew\RequestProcessor\Exception;
/** /**
* Class for {@link \Mibew\RequestProcessor\RequestProcessor} exceptions. * Class for {@link \Mibew\RequestProcessor\Processor} exceptions.
*/ */
class RequestProcessorException extends \Exception { class ProcessorException extends \Exception {
/** /**
* Wrong function arguments * Wrong function arguments
*/ */

View File

@ -20,7 +20,7 @@ namespace Mibew\RequestProcessor\Exception;
/** /**
* Class for {@link \Mibew\RequestProcessor\ThreadProcessor} exceptions. * Class for {@link \Mibew\RequestProcessor\ThreadProcessor} exceptions.
*/ */
class ThreadProcessorException extends RequestProcessorException { class ThreadProcessorException extends ProcessorException {
/** /**
* 'recipient' argument is not set * 'recipient' argument is not set
*/ */

View File

@ -20,7 +20,7 @@ namespace Mibew\RequestProcessor\Exception;
/** /**
* Class for {@link \Mibew\RequestProcessor\UsersProcessor} exceptions * Class for {@link \Mibew\RequestProcessor\UsersProcessor} exceptions
*/ */
class UsersProcessorException extends RequestProcessorException { class UsersProcessorException extends ProcessorException {
/** /**
* Operator is not logged in * Operator is not logged in
*/ */

View File

@ -20,7 +20,7 @@ namespace Mibew\RequestProcessor;
// Import namespaces and classes of the core // Import namespaces and classes of the core
use Mibew\Database; use Mibew\Database;
use Mibew\EventDispatcher; use Mibew\EventDispatcher;
use Mibew\RequestProcessor\Exception\RequestProcessorException; use Mibew\RequestProcessor\Exception\ProcessorException;
/** /**
* Implements abstract class for request processing * Implements abstract class for request processing
@ -268,9 +268,9 @@ abstract class Processor {
try { try {
// Check functions to call // Check functions to call
if (! is_array($functions)) { if (! is_array($functions)) {
throw new RequestProcessorException( throw new ProcessorException(
'#1 argument must be an array!', '#1 argument must be an array!',
RequestProcessorException::WRONG_ARGUMENTS ProcessorException::WRONG_ARGUMENTS
); );
} }
foreach ($functions as $function) { foreach ($functions as $function) {
@ -465,7 +465,7 @@ abstract class Processor {
if (is_callable(array($this, $method_name))) { if (is_callable(array($this, $method_name))) {
try { try {
$func['results'] = $this->$method_name($func['arguments']); $func['results'] = $this->$method_name($func['arguments']);
} catch(RequestProcessorException $e) { } catch(ProcessorException $e) {
$func['results'] = array( $func['results'] = array(
'errorCode' => $e->getCode(), 'errorCode' => $e->getCode(),
'errorMessage' => $e->getMessage() 'errorMessage' => $e->getMessage()