(Yaf >=1.0.0)
Yaf_Exception::__construct — Construct a Yaf exception
Constructs a new Yaf_Exception. The code carries the Yaf error code that identifies the type of failure, and is exposed via Exception::getCode().
messageThe exception message.
codeThe Yaf error code.
No value is returned.
Example #1 Yaf_Exception::__construct() example
<?php
throw new Yaf_Exception(
"Failed to find the controller 'Product'",
YAF_ERR_NOTFOUND_CONTROLLER /* 516 */
);
?>The above example will output something similar to:
PHP Fatal error: Uncaught Yaf_Exception: Failed to find the controller 'Product' in /path/to/index.php:2