<?php

require_once '../../Wact/Loader.inc.php';
Wact_Loader::setupWact();

function Oops() {
    throw new Exception('This is the PHP exception message');
}

function Wrap() {
    try {
        Oops();
    } catch (Exception $e) {
        throw new Wact_Exception_Base('An exception has occurred and been repackaged', $e);
    }
}

echo "This is an example of a standard php Exception, ";
echo "caught and wrapped in a new exception ";
echo "while no exception handler is active.<br/>\n<hr/>\n";

Wrap();

?>