Re: simplifying raiseError
| From: | Brent Cook | Date: | Wed, 10 Jul 2002 17:47:48 +0000 |
| Subject: | Re: simplifying raiseError | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7643@lists.php.net to get a copy of this message | ||
> A current limitation of the PEAR Error system is that it can't handle
> dynamic error messages: "The max value is [int]" (and of course [int]
> may change its position in the string in a different language). So I
> guess we would need a system that can accept data to "bind" to the error
> message and placeholders for the messages (I'd vote for the gettext
> style):
>
> $this->raiseError("The max value is %s", null, null, $max);
> or
> $this->raiseError(null, SOME_CODE, null, $max);
Do I misunderstand you, or would this not suffice?
$this->raiseError("The max value is $max");
Simplify, simplify!
- Brent