upgraded dependencies

This commit is contained in:
RafficMohammed
2023-01-08 01:59:16 +05:30
parent 51056e3aad
commit f9ae387337
6895 changed files with 133617 additions and 178680 deletions

View File

@@ -3,7 +3,7 @@
/*
* This file is part of Psy Shell.
*
* (c) 2012-2018 Justin Hileman
* (c) 2012-2022 Justin Hileman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -12,9 +12,7 @@
namespace Psy;
use Psy\Exception\BreakException;
use Psy\Exception\ErrorException;
use Psy\Exception\ThrowUpException;
use Psy\Exception\TypeErrorException;
/**
* The Psy Shell's execution loop scope.
@@ -33,7 +31,7 @@ class ExecutionLoopClosure extends ExecutionClosure
// Restore execution scope variables
\extract($__psysh__->getScopeVariables(false));
do {
while (true) {
$__psysh__->beforeLoop();
try {
@@ -55,25 +53,16 @@ class ExecutionLoopClosure extends ExecutionClosure
$_ = eval($__psysh__->onExecute($__psysh__->flushCode() ?: ExecutionClosure::NOOP_INPUT));
} catch (\Throwable $_e) {
// Clean up on our way out.
\restore_error_handler();
if (\ob_get_level() > 0) {
\ob_end_clean();
}
throw $_e;
} catch (\Exception $_e) {
// Clean up on our way out.
} finally {
// Won't be needing this anymore
\restore_error_handler();
if (\ob_get_level() > 0) {
\ob_end_clean();
}
throw $_e;
}
// Won't be needing this anymore
\restore_error_handler();
// Flush stdout (write to shell output, plus save to magic variable)
\ob_end_flush();
@@ -89,16 +78,12 @@ class ExecutionLoopClosure extends ExecutionClosure
$__psysh__->writeException($_e);
throw $_e;
} catch (\TypeError $_e) {
$__psysh__->writeException(TypeErrorException::fromTypeError($_e));
} catch (\Error $_e) {
$__psysh__->writeException(ErrorException::fromError($_e));
} catch (\Exception $_e) {
} catch (\Throwable $_e) {
$__psysh__->writeException($_e);
}
$__psysh__->afterLoop();
} while (true);
}
});
}
}