Location: PHPKode > scripts > PHP Xforms > php-xforms/PhpXforms/ExceptionHandler.php
<?php

/**
 * Class PhpXforms_ExceptionHandler
 *
 * $Id$
 */

require_once dirname(__FILE__) . '/ErrorList.php';

class PhpXforms_ExceptionHandler {

	/**
	 * @var PhpXforms_ErrorList
	 */
	protected $_errorList;

	/**
	 * @param string $encoding
	 */
	function __construct($encoding = null)
	{
		$this->_errorList = new PhpXforms_ErrorList($encoding);
	}

	/**
	 * Display error as XML document
	 *
	 * @param Exception $e
	 */
	function xmlErrorList(Exception $e)
	{
		$this->_errorList->push($e->getMessage());
		$this->_errorList->toXml();
	}
}
Return current item: PHP Xforms