Hoa central
Public Member Functions | List of all members
Hoa\Core\Exception\Exception Class Reference
Inheritance diagram for Hoa\Core\Exception\Exception:

Public Member Functions

 __construct ($message, $code=0, $arguments=[], $previous=null)
 
 send ()
 
- Public Member Functions inherited from Hoa\Core\Exception\Idle
 __construct ($message, $code=0, $arguments=[],\Exception $previous=null)
 
 getBacktrace ()
 
 getPreviousThrow ()
 
 getArguments ()
 
 getRawMessage ()
 
 getFormattedMessage ()
 
 getFrom ()
 
 raise ($previous=false)
 
 __toString ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Hoa\Core\Exception\Idle
static uncaught ($exception)
 
static error ($errno, $errstr, $errfile, $errline)
 
- Protected Attributes inherited from Hoa\Core\Exception\Idle
 $_tmpArguments = null
 
 $_arguments = null
 
 $_trace = null
 
 $_previous = null
 
 $_rawMessage = null
 

Detailed Description

Class .

Each exception must extend .

Definition at line 333 of file Exception.php.

Constructor & Destructor Documentation

Hoa\Core\Exception\Exception::__construct (   $message,
  $code = 0,
  $arguments = [],
  $previous = null 
)

Create an exception. An exception is built with a formatted message, a code (an ID), and an array that contains the list of formatted string for the message. If chaining, we can add a previous exception.

Parameters
string$messageFormatted message.
int$codeCode (the ID).
array$argumentsArguments to format message.
\BaseException$previousPrevious exception in chaining.
Returns
void

Definition at line 347 of file Exception.php.

352  {
353  parent::__construct($message, $code, $arguments, $previous);
354 
355  if (false === Core\Event::eventExists('hoa://Event/Exception')) {
356  Core\Event::register('hoa://Event/Exception', __CLASS__);
357  }
358 
359  $this->send();
360 
361  return;
362  }

Here is the call graph for this function:

Member Function Documentation

Hoa\Core\Exception\Exception::send ( )

Send the exception on hoa://Event/Exception.

Returns
void

Definition at line 369 of file Exception.php.

370  {
371  Core\Event::notify(
372  'hoa://Event/Exception',
373  $this,
374  new Core\Event\Bucket($this)
375  );
376 
377  return;
378  }

Here is the caller graph for this function:


The documentation for this class was generated from the following file: