manageForeignResources: Use Maintenance::fatalError, not exceptions

Change-Id: Ic6a4e42793d5f2d3e874e155ccbad1467e25698f
This commit is contained in:
Ammarpad 2021-05-02 22:53:40 +01:00 committed by Jforrester
parent 3e71293b80
commit be4e48e93f

View file

@ -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()}" );
}
}
}