1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 17:51:19 +01:00

Properly shutdown in case of exception

This commit is contained in:
Daniil Gentili 2019-09-03 18:21:43 +02:00
parent f26665479e
commit 662c947953
3 changed files with 7 additions and 16 deletions

View File

@ -93,5 +93,6 @@ class Exception extends \Exception
public static function ExceptionHandler($exception) public static function ExceptionHandler($exception)
{ {
Logger::log($exception, Logger::FATAL_ERROR); Logger::log($exception, Logger::FATAL_ERROR);
Magic::shutdown();
} }
} }

File diff suppressed because one or more lines are too long

View File

@ -14,6 +14,8 @@ If not, see <http://www.gnu.org/licenses/>.
/** /**
* Various ways to load MadelineProto. * Various ways to load MadelineProto.
*/ */
if (!\file_exists(__DIR__.'/../vendor/autoload.php')) { if (!\file_exists(__DIR__.'/../vendor/autoload.php')) {
echo 'You did not run composer update, using madeline.php'.PHP_EOL; echo 'You did not run composer update, using madeline.php'.PHP_EOL;
if ($phar = \getenv('TRAVIS_PHAR')) { if ($phar = \getenv('TRAVIS_PHAR')) {