1: <?php
2: /**
3: * @author Chuck Hagenbuch <chuck@horde.org>
4: * @author Mike Naberezny <mike@maintainable.com>
5: * @license http://www.horde.org/licenses/bsd BSD
6: * @category Horde
7: * @package Argv
8: */
9:
10: /**
11: * Raised if an Option instance is created with invalid or
12: * inconsistent arguments.
13: *
14: * @category Horde
15: * @package Argv
16: */
17: class Horde_Argv_OptionException extends Horde_Argv_Exception
18: {
19: public function __construct($msg, $option = null)
20: {
21: $this->optionId = (string)$option;
22: if ($this->optionId) {
23: parent::__construct(sprintf('option %s: %s', $this->optionId, $msg));
24: } else {
25: parent::__construct($msg);
26: }
27: }
28:
29: }
30: