Get rid of redundant \Exception catch blocks
parent
4e6d54b731
commit
0ece276c7c
|
@ -160,8 +160,6 @@ class ZipDownloader extends ArchiveDownloader
|
||||||
return $tryFallback(new \RuntimeException('Failed to extract '.$package->getName().': ('.$process->getExitCode().') '.$command."\n\n".$output));
|
return $tryFallback(new \RuntimeException('Failed to extract '.$package->getName().': ('.$process->getExitCode().') '.$command."\n\n".$output));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (\Exception $e) {
|
|
||||||
return $tryFallback($e);
|
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return $tryFallback($e);
|
return $tryFallback($e);
|
||||||
}
|
}
|
||||||
|
@ -195,8 +193,6 @@ class ZipDownloader extends ArchiveDownloader
|
||||||
}
|
}
|
||||||
} catch (\ErrorException $e) {
|
} catch (\ErrorException $e) {
|
||||||
$processError = new \RuntimeException('The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems): '.$e->getMessage(), 0, $e);
|
$processError = new \RuntimeException('The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems): '.$e->getMessage(), 0, $e);
|
||||||
} catch (\Exception $e) {
|
|
||||||
$processError = $e;
|
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
$processError = $e;
|
$processError = $e;
|
||||||
}
|
}
|
||||||
|
|
|
@ -255,10 +255,6 @@ class ProcessExecutor
|
||||||
} else {
|
} else {
|
||||||
$process = new Process($command, $cwd, null, null, static::getTimeout());
|
$process = new Process($command, $cwd, null, null, static::getTimeout());
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
|
||||||
call_user_func($job['reject'], $e);
|
|
||||||
|
|
||||||
return;
|
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
call_user_func($job['reject'], $e);
|
call_user_func($job['reject'], $e);
|
||||||
|
|
||||||
|
@ -269,10 +265,6 @@ class ProcessExecutor
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$process->start();
|
$process->start();
|
||||||
} catch (\Exception $e) {
|
|
||||||
call_user_func($job['reject'], $e);
|
|
||||||
|
|
||||||
return;
|
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
call_user_func($job['reject'], $e);
|
call_user_func($job['reject'], $e);
|
||||||
|
|
||||||
|
|
|
@ -573,7 +573,6 @@ class RemoteFilesystem
|
||||||
// passing `null` to file_get_contents will convert `null` to `0` and return 0 bytes
|
// passing `null` to file_get_contents will convert `null` to `0` and return 0 bytes
|
||||||
$result = file_get_contents($fileUrl, false, $context);
|
$result = file_get_contents($fileUrl, false, $context);
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue