Location: PHPKode > scripts > PAX > pax/core/exceptions/PAXException.excpt.php
<?php

/**
 * Page DocBlock definition
 * @package org.zadara.marius.pax
 */

/**
 * PAX exception definition.
 * 
 * @author Marius Zadara <hide@address.com>
 * @category Exceptions
 * @copyright (C) 2008-2009 Marius Zadara
 * @license Free for non-comercial use
 * @package org.zadara.marius.pax
 * @final 
 */
final class PAXException extends Exception 
{
    /**
     * Exception constructor
     *
     * @access public
     * @param string <b>$message</b> The message for the exception
     * @param int <b>$code</b> The exception code (default 0)
     */
	public function __construct($message, $code = 0)
	{
	    // init the parent
		parent::__construct($message, $code);		
	}
	
	/**
	 * Textul representation of the exception
	 * 
	 * @access public
	 */
	public function __toString()
	{
		// use the message and the code
		return sprintf("<b>PAX Exception</b>: %s (code %d)", $this->message, $this->code);
	}
}

?>
Return current item: PAX