Skip to content

Commit

Permalink
Throw in LibUvLoop when uv ext is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Mar 13, 2018
1 parent 5bd583a commit 5db28c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/LibUvLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ final class LibUvLoop implements LoopInterface

public function __construct()
{
if (!function_exists('uv_loop_new')) {
throw new BadMethodCallException('Cannot create LibUvLoop, ext-uv extension missing');
}

$this->uv = \uv_loop_new();
$this->futureTickQueue = new FutureTickQueue();
$this->timerEvents = new SplObjectStorage();
Expand Down

0 comments on commit 5db28c5

Please sign in to comment.