parent
febb2d1ae2
commit
a2011b1665
|
@ -219,8 +219,8 @@ class Manager
|
||||||
|
|
||||||
if (!is_writable($this->enableDir)) {
|
if (!is_writable($this->enableDir)) {
|
||||||
throw new SystemPermissionException(
|
throw new SystemPermissionException(
|
||||||
'Can not enable module "' . $name . '". '
|
'Can not enable module "%s". Insufficient system permissions for enabling modules.',
|
||||||
. 'Insufficient system permissions for enabling modules.'
|
$name
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,9 +232,11 @@ class Manager
|
||||||
$error = error_get_last();
|
$error = error_get_last();
|
||||||
if (strstr($error["message"], "File exists") === false) {
|
if (strstr($error["message"], "File exists") === false) {
|
||||||
throw new SystemPermissionException(
|
throw new SystemPermissionException(
|
||||||
'Could not enable module "' . $name . '" due to file system errors. '
|
'Could not enable module "%s" due to file system errors. '
|
||||||
. 'Please check path and mounting points because this is not a permission error. '
|
. 'Please check path and mounting points because this is not a permission error. '
|
||||||
. 'Primary error was: ' . $error['message']
|
. 'Primary error was: %s',
|
||||||
|
$name,
|
||||||
|
$error['message']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -287,9 +289,11 @@ class Manager
|
||||||
if (!@unlink($link)) {
|
if (!@unlink($link)) {
|
||||||
$error = error_get_last();
|
$error = error_get_last();
|
||||||
throw new SystemPermissionException(
|
throw new SystemPermissionException(
|
||||||
'Could not disable module "' . $name . '" due to file system errors. '
|
'Could not disable module "%s" due to file system errors. '
|
||||||
. 'Please check path and mounting points because this is not a permission error. '
|
. 'Please check path and mounting points because this is not a permission error. '
|
||||||
. 'Primary error was: ' . $error['message']
|
. 'Primary error was: %s',
|
||||||
|
$name,
|
||||||
|
$error['message']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
|
|
||||||
namespace Icinga\Exception;
|
namespace Icinga\Exception;
|
||||||
|
|
||||||
use \Exception;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle problems according to file system permissions
|
* Handle problems according to file system permissions
|
||||||
*/
|
*/
|
||||||
class SystemPermissionException extends Exception
|
class SystemPermissionException extends IcingaException
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue