All pastes #393851 Raw Edit

Mine

public php v1 · immutable
·published 2007-03-13 21:47 UTC
rendered paste body
class PLException extends Exception {	protected $messages = array(		);	public function __construct($code) { 		$args = func_get_args();		array_shift($args);		if (array_key_exists($code, $this->messages)) {			$message = vsprintf($this->messages[$code], $args);		} else {			$message = "Unknown error ".$code;		}		parent::__construct($message, $code);	}}class PLConfigException extends PLException{	protected $messages = array(		1 => "Couldn't open \"%s\" for reading",		2 => "Invalid configuration option \"%s\" in %s, line %s",		);}