The WebAbility® Network Developers - Documentation
WebAbility Site
\core\WAException reference

I. Structure:


- namespace:
\core\

- Uses:
trait \core\WAThrowable

- Direct known subclasses:
\throwables\FileException

II. Description:


The class \core\WAException is the root of any event that should be catched because they are not critical for the application working and should be analyzed by the code. The exception should be captured with the try-catch system.

In other words, using a code that can throw an exception should be programmed this way:


try
{
return $this->doSomething();
}
catch (\core\WAException $e)
{
// log the error, undo things, say error, etc.
return $e->__toString();
}




III. Reference:


3.1. Constructor:


\core\WAException($message)
$message contains the message to notify the error thrown.

3.2. Attributes:

none

3.3. Methods:

none