Having a string as does not have any effect as it gets set to zero in the Exception constructor.
if (!isset($this->_layout[$row][$col]) ||
$this->isEmpty($row, $col) ||
$this->isCovered($row, $col)) {
- throw new Horde_Exception('No block exists at the requested position', 'horde.error');
+ throw new Horde_Exception('No block exists at the requested position');
}
return array(
public function setBlockInfo($row, $col, $info = array())
{
if (!isset($this->_layout[$row][$col])) {
- throw new Horde_Exception('No block exists at the requested position', 'horde.error');
+ throw new Horde_Exception('No block exists at the requested position');
}
if (isset($info['app'])) {
return count($this->_layout[$row]);
}
- throw new Horde_Exception(sprintf('The specified row (%d) does not exist.', $row), 'horde.error');
+ throw new Horde_Exception(sprintf('The specified row (%d) does not exist.', $row));
}
/**
if (!empty($result->stderr)) {
$msg .= ' ' . _("Returned error message:") . ' ' . $result->stderr;
}
- throw new Horde_Exception($msg, 'horde.error');
+ throw new Horde_Exception($msg);
}
return array('public' => $public_key, 'private' => $secret_key);
/* Get e-mail address of public key. */
$key_info = $this->pgpPacketInformation($public_key);
if (!isset($key_info['signature']['id1']['email'])) {
- throw new Horde_Exception(_("Could not determine the recipient's e-mail address."), 'horde.error');
+ throw new Horde_Exception(_("Could not determine the recipient's e-mail address."));
}
/* Encrypt a test message. */
return substr($start, 0, $length);
}
- throw new Horde_Exception(_("Could not obtain public key from the keyserver."), 'horde.error');
+ throw new Horde_Exception(_("Could not obtain public key from the keyserver."));
}
/**
} while (++$connRefuse < self::KEYSERVER_REFUSE);
if ($errno == 0) {
- throw new Horde_Exception(_("Connection refused to the public keyserver."), 'horde.error');
+ throw new Horde_Exception(_("Connection refused to the public keyserver."));
} else {
- throw new Horde_Exception(sprintf(_("Connection refused to the public keyserver. Reason: %s (%s)"), Horde_String::convertCharset($errstr, Horde_Nls::getExternalCharset()), $errno), 'horde.error');
+ throw new Horde_Exception(sprintf(_("Connection refused to the public keyserver. Reason: %s (%s)"), Horde_String::convertCharset($errstr, Horde_Nls::getExternalCharset()), $errno));
}
}
$result = $this->_callGpg($cmdline, 'w', empty($params['symmetric']) ? null : $params['passphrase'], true, true);
if (empty($result->output)) {
$error = preg_replace('/\n.*/', '', $result->stderr);
- throw new Horde_Exception(_("Could not PGP encrypt message: ") . $error, 'horde.error');
+ throw new Horde_Exception(_("Could not PGP encrypt message: ") . $error);
}
return $result->output;
if (!isset($params['pubkey']) ||
!isset($params['privkey']) ||
!isset($params['passphrase'])) {
- throw new Horde_Exception(_("A public PGP key, private PGP key, and passphrase are required to sign a message."), 'horde.error');
+ throw new Horde_Exception(_("A public PGP key, private PGP key, and passphrase are required to sign a message."));
}
/* Create temp files for input. */
$result = $this->_callGpg($cmdline, 'w', $params['passphrase'], true, true);
if (empty($result->output)) {
$error = preg_replace('/\n.*/', '', $result->stderr);
- throw new Horde_Exception(_("Could not PGP sign message: ") . $error, 'horde.error');
+ throw new Horde_Exception(_("Could not PGP sign message: ") . $error);
}
return $result->output;
/* Check for required parameters. */
if (!isset($params['passphrase']) && empty($params['no_passphrase'])) {
- throw new Horde_Exception(_("A passphrase is required to decrypt a message."), 'horde.error');
+ throw new Horde_Exception(_("A passphrase is required to decrypt a message."));
}
/* Create temp files. */
}
if (empty($result->output)) {
$error = preg_replace('/\n.*/', '', $result->stderr);
- throw new Horde_Exception(_("Could not decrypt PGP data: ") . $error, 'horde.error');
+ throw new Horde_Exception(_("Could not decrypt PGP data: ") . $error);
}
/* Create the return object. */
{
/* Check for required parameters. */
if (!isset($params['pubkey'])) {
- throw new Horde_Exception(_("A public PGP key is required to verify a signed message."), 'horde.error');
+ throw new Horde_Exception(_("A public PGP key is required to verify a signed message."));
}
if (($params['type'] === 'detached-signature') &&
!isset($params['signature'])) {
- throw new Horde_Exception(_("The detached PGP signature block is required to verify the signed message."), 'horde.error');
+ throw new Horde_Exception(_("The detached PGP signature block is required to verify the signed message."));
}
$good_sig_flag = 0;
* Bad signature:
* gpg: BAD signature from "blah blah blah (Comment)" */
if (strpos($result, 'gpg: BAD signature') !== false) {
- throw new Horde_Exception($result, 'horde.error');
+ throw new Horde_Exception($result);
}
$ob = new stdClass;
/* If the key is empty, something went wrong. */
if (empty($results->output)) {
- throw new Horde_Exception(_("Revocation key not generated successfully."), 'horde.error');
+ throw new Horde_Exception(_("Revocation key not generated successfully."));
}
return $results->output;
if ($result === true) {
throw new Horde_Exception(_("Message Verified Successfully but the signer's certificate could not be verified."), 'horde.warning');
} elseif ($result == -1) {
- throw new Horde_Exception(_("Verification failed - an unknown error has occurred."), 'horde.error');
+ throw new Horde_Exception(_("Verification failed - an unknown error has occurred."));
} else {
- throw new Horde_Exception(_("Verification failed - this message may have been tampered with."), 'horde.error');
+ throw new Horde_Exception(_("Verification failed - this message may have been tampered with."));
}
$ob->cert = file_get_contents($output);
return $ret;
}
- throw new Horde_Exception(_("OpenSSL error: Could not extract data from signed S/MIME part."), 'horde.error');
+ throw new Horde_Exception(_("OpenSSL error: Could not extract data from signed S/MIME part."));
}
/**
{
/* Check for required parameters. */
if (!isset($params['pubkey'])) {
- throw new Horde_Exception(_("A public S/MIME key is required to encrypt a message."), 'horde.error');
+ throw new Horde_Exception(_("A public S/MIME key is required to encrypt a message."));
}
/* Create temp files for input/output. */
}
}
- throw new Horde_Exception(_("Could not S/MIME encrypt message."), 'horde.error');
+ throw new Horde_Exception(_("Could not S/MIME encrypt message."));
}
/**
if (!isset($params['pubkey']) ||
!isset($params['privkey']) ||
!array_key_exists('passphrase', $params)) {
- throw new Horde_Exception(_("A public S/MIME key, private S/MIME key, and passphrase are required to sign a message."), 'horde.error');
+ throw new Horde_Exception(_("A public S/MIME key, private S/MIME key, and passphrase are required to sign a message."));
}
/* Create temp files for input/output/certificates. */
}
if (!$res) {
- throw new Horde_Exception(_("Could not S/MIME sign message."), 'horde.error');
+ throw new Horde_Exception(_("Could not S/MIME sign message."));
}
$data = file_get_contents($output);
if (!isset($params['pubkey']) ||
!isset($params['privkey']) ||
!array_key_exists('passphrase', $params)) {
- throw new Horde_Exception(_("A public S/MIME key, private S/MIME key, and passphrase are required to decrypt a message."), 'horde.error');
+ throw new Horde_Exception(_("A public S/MIME key, private S/MIME key, and passphrase are required to decrypt a message."));
}
/* Create temp files for input/output. */
return file_get_contents($output);
}
- throw new Horde_Exception(_("Could not decrypt S/MIME data."), 'horde.error');
+ throw new Horde_Exception(_("Could not decrypt S/MIME data."));
}
/**
$this->checkForOpenSSL();
if (!isset($params['sslpath'])) {
- throw new Horde_Exception(_("No path to the OpenSSL binary provided. The OpenSSL binary is necessary to work with PKCS 12 data."), 'horde.error');
+ throw new Horde_Exception(_("No path to the OpenSSL binary provided. The OpenSSL binary is necessary to work with PKCS 12 data."));
}
$sslpath = escapeshellcmd($params['sslpath']);
$ob->private = trim(file_get_contents($output));
if (empty($ob->private)) {
- throw new Horde_Exception(_("Password incorrect"), 'horde.error');
+ throw new Horde_Exception(_("Password incorrect"));
}
/* Extract the client public key next. */
return new $class($params);
}
- throw new Horde_Exception('Could not create IMP_Quota instance: ' . $driver, 'horde.error');
+ throw new Horde_Exception('Could not create IMP_Quota instance: ' . $driver);
}
/**
if (!empty($GLOBALS['conf']['storage']['maxblacklist'])) {
$addr_count = count($addr);
if ($addr_count > $GLOBALS['conf']['storage']['maxblacklist']) {
- throw new Ingo_Exception(sprintf(_("Maximum number of blacklisted addresses exceeded (Total addresses: %s, Maximum addresses: %s). Could not add new addresses to blacklist."), $addr_count, $GLOBALS['conf']['storage']['maxblacklist']), 'horde.error');
+ throw new Ingo_Exception(sprintf(_("Maximum number of blacklisted addresses exceeded (Total addresses: %s, Maximum addresses: %s). Could not add new addresses to blacklist."), $addr_count, $GLOBALS['conf']['storage']['maxblacklist']));
}
}
if (!empty($GLOBALS['conf']['storage']['maxwhitelist'])) {
$addr_count = count($addr);
if ($addr_count > $GLOBALS['conf']['storage']['maxwhitelist']) {
- throw new Ingo_Exception(sprintf(_("Maximum number of whitelisted addresses exceeded (Total addresses: %s, Maximum addresses: %s). Could not add new addresses to whitelist."), $addr_count, $GLOBALS['conf']['storage']['maxwhitelist']), 'horde.error');
+ throw new Ingo_Exception(sprintf(_("Maximum number of whitelisted addresses exceeded (Total addresses: %s, Maximum addresses: %s). Could not add new addresses to whitelist."), $addr_count, $GLOBALS['conf']['storage']['maxwhitelist']));
}
}