1
0
mirror of https://github.com/danog/loop.git synced 2024-12-11 16:59:46 +01:00
loop/test/Traits/BasicException.php
2020-07-21 19:12:11 +02:00

29 lines
534 B
PHP

<?php
/**
* Exception test trait.
*
* @author Daniil Gentili <daniil@daniil.it>
* @copyright 2016-2020 Daniil Gentili <daniil@daniil.it>
* @license https://opensource.org/licenses/MIT MIT
*/
namespace danog\Loop\Test\Traits;
use Generator;
trait BasicException
{
use Basic;
/**
* Loop implementation.
*
* @return Generator
*/
public function loop(): Generator
{
$this->inited = true;
throw new \RuntimeException('Threw exception!');
$this->ran = true;
}
}