From be4e48e93ff9d6b0edd10214ddcf5601637ad1c3 Mon Sep 17 00:00:00 2001 From: Ammarpad Date: Sun, 2 May 2021 22:53:40 +0100 Subject: [PATCH] manageForeignResources: Use Maintenance::fatalError, not exceptions Change-Id: Ic6a4e42793d5f2d3e874e155ccbad1467e25698f --- maintenance/manageForeignResources.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/maintenance/manageForeignResources.php b/maintenance/manageForeignResources.php index 54554b8c5b5..c68d456f14c 100644 --- a/maintenance/manageForeignResources.php +++ b/maintenance/manageForeignResources.php @@ -56,7 +56,6 @@ TEXT /** * @return bool - * @throws Exception */ public function execute() { global $IP; @@ -78,7 +77,12 @@ TEXT $action = $this->getArg( 0 ); $module = $this->getArg( 1, 'all' ); - return $frm->run( $action, $module ); + + try { + return $frm->run( $action, $module ); + } catch ( Exception $e ) { + $this->fatalError( "Error: {$e->getMessage()}" ); + } } }