summaryrefslogtreecommitdiff
path: root/Zend/tests/exception_018.phpt
blob: aa39d53b676dc4ee8d58f65b3ea160ec3251447d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--TEST--
Testing throw exception doesn't crash with wrong params, variant 1
--FILE--
<?php

class Hello extends Exception {}
throw new Hello(new stdClass);

?>
--EXPECTF--
Fatal error: Uncaught Error: Wrong parameters for Hello([string $message [, long $code [, Throwable $previous = NULL]]]) in %sexception_018.php:%d
Stack trace:
#0 %sexception_018.php(%d): Exception->__construct(Object(stdClass))
#1 {main}
  thrown in %sexception_018.php on line %d