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: Uncaught Error: Cannot throw objects that do not implement Throwable in %s:%d 19Stack trace: 20#0 {main} 21 thrown in %s on line %d 22