1--TEST--
2Generator::throw() with something that's not an exception
3--FILE--
4<?php
5
6function gen() {
7    yield;
8}
9
10$gen = gen();
11$gen->throw(new stdClass);
12
13?>
14--EXPECTF--
15Fatal error: Uncaught Error: Cannot throw objects that do not implement Throwable in %s:%d
16Stack trace:
17#0 [internal function]: gen()
18#1 %s(%d): Generator->throw(Object(stdClass))
19#2 {main}
20  thrown in %s on line %d
21