xref: /PHP-5.3/Zend/tests/exception_004.phpt (revision f6c57d1f)
1--TEST--
2Throwing exception using a class that isn't derived from the Exception base class
3--FILE--
4<?php
5
6error_reporting(E_ALL|E_STRICT);
7
8class Foo { }
9
10try {
11	throw new Foo();
12} catch (Foo $e) {
13	var_dump($e);
14}
15
16?>
17--EXPECTF--
18Fatal error: Exceptions must be valid objects derived from the Exception base class in %s on line %d
19