Fixed timer implementation
This commit is contained in:
19
examples/errors.php
Normal file
19
examples/errors.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__."/../vendor/autoload.php";
|
||||
|
||||
use NoccyLabs\Shell\Shell;
|
||||
use NoccyLabs\Shell\Context;
|
||||
|
||||
class CatchAllContext extends Context
|
||||
{
|
||||
public function execute($cmd, ...$arg)
|
||||
{
|
||||
throw new \Exception("Uh-oh! Error!");
|
||||
}
|
||||
}
|
||||
|
||||
$myShell = new Shell();
|
||||
$myShell->setPrompt("test>");
|
||||
$myShell->pushContext(new CatchAllContext());
|
||||
$myShell->run();
|
Reference in New Issue
Block a user