Don't throw any exception

refs #8705
This commit is contained in:
Alexander A. Klimov 2015-06-05 17:12:32 +02:00
parent 38cecdb724
commit 76e748c483
1 changed files with 3 additions and 5 deletions

View File

@ -3,8 +3,6 @@
namespace Icinga\Application;
use Icinga\Exception\IcingaException;
/**
* Platform tests for icingaweb
*/
@ -95,7 +93,7 @@ class Platform
foreach ($osRelease as $osInfo) {
if (false === ($res = @preg_match('/(?<!.)[ \t]*#/ms', $osInfo))) {
throw new IcingaException('Failed at preg_match()');
return false;
}
if ($res === 1) {
continue;
@ -107,7 +105,7 @@ class Platform
$osInfo,
$matches
))) {
throw new IcingaException('Failed at preg_match()');
return false;
}
if (! ($res === 0 || $matches[2] === '' || $matches[2] === 'linux')) {
return $matches[2];
@ -159,7 +157,7 @@ class Platform
if ($reliable < 1) {
if (false === ($procVersion = @file_get_contents('/proc/version'))) {
throw new IcingaException('Failed at file_get_contents(/proc/version)');
return false;
}
$procVersion = strtolower($procVersion);
foreach (array(