amp /include/Savant/Savant2/tests/9_errors.php

Language PHP Lines 47
MD5 Hash a1422f8f66952eff170e9eec7dd3f821 Estimated Cost $585 (why?)
Repository https://github.com/radicaldesigns/amp.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php

/**
* 
* Tests default plugins
*
* @version $Id: 9_errors.php,v 1.2 2004/11/05 16:00:38 pmjones Exp $
* 
*/

error_reporting(E_ALL);

require_once 'Savant2.php';

$savant = new Savant2();

require_once 'PEAR.php';
PEAR::setErrorHandling(PEAR_ERROR_PRINT);

echo "<h1>PEAR_Error</h1>\n";
$savant->setError('pear');
$result = $savant->loadPlugin('nosuchthing');
echo "<pre>\n";
print_r($result);
echo "</pre>\n\n";

echo "<h1>PEAR_ErrorStack</h1>\n";
$savant->setError('stack');
$result = $savant->loadPlugin('nosuchthing');
echo "<pre>\n";
print_r($result);
echo "</pre>\n\n";

echo "<pre>\n";
print_r(print_r($GLOBALS['_PEAR_ERRORSTACK_SINGLETON']));
echo "</pre>\n\n";

echo "<h1>Exception</h1>\n";
$savant->setError('exception');
$result = $savant->loadPlugin('nosuchthing');
echo "<pre>\n";
print_r($result);
echo "</pre>\n\n";


?>
Back to Top