diff vendor/psy/psysh/src/ExecutionLoop.php @ 16:c2387f117808

Routine composer update
author Chris Cannam
date Tue, 10 Jul 2018 15:07:59 +0100
parents 5fb285c0d0e3
children 129ea1e6d783
line wrap: on
line diff
--- a/vendor/psy/psysh/src/ExecutionLoop.php	Thu Apr 26 11:26:54 2018 +0100
+++ b/vendor/psy/psysh/src/ExecutionLoop.php	Tue Jul 10 15:07:59 2018 +0100
@@ -11,10 +11,7 @@
 
 namespace Psy;
 
-use Psy\Exception\BreakException;
 use Psy\Exception\ErrorException;
-use Psy\Exception\ThrowUpException;
-use Psy\Exception\TypeErrorException;
 
 /**
  * The Psy Shell execution loop.
@@ -32,33 +29,8 @@
     {
         $this->loadIncludes($shell);
 
-        $closure = new ExecutionClosure($shell);
-
-        do {
-            $shell->beforeLoop();
-
-            try {
-                $shell->getInput();
-                $_ = $closure->execute();
-                $shell->writeReturnValue($_);
-            } catch (BreakException $_e) {
-                $shell->writeException($_e);
-
-                return;
-            } catch (ThrowUpException $_e) {
-                $shell->writeException($_e);
-
-                throw $_e;
-            } catch (\TypeError $_e) {
-                $shell->writeException(TypeErrorException::fromTypeError($_e));
-            } catch (\Error $_e) {
-                $shell->writeException(ErrorException::fromError($_e));
-            } catch (\Exception $_e) {
-                $shell->writeException($_e);
-            }
-
-            $shell->afterLoop();
-        } while (true);
+        $closure = new ExecutionLoopClosure($shell);
+        $closure->execute();
     }
 
     /**