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 TypeError: Generator::throw(): Argument #1 ($exception) must be of type Throwable, stdClass given in %s:%d
16Stack trace:
17#0 %s(%d): Generator->throw(Object(stdClass))
18#1 {main}
19  thrown in %s on line %d
20