On 7/9/07, Andrew Garrett andrew@epstone.net wrote:
On 7/9/07, Rob Church robchur@gmail.com wrote:
My gut says it might be saner to return a simple array( const, message ), where const is one of a set of constants defined somewhere, perhaps abusing a class for namespace purposes, which provides a simple meaningful check. You might as well render the message *for* the caller, since you're basically passing back all the pieces.
That's a really interesting, and good, idea. It makes interpreting the data for purposes other than simply displaying the message much easier (and it saves an issue I had with the cascading protection message. Thanks, Rob!
On second thoughts, I wonder if this'd make it harder to take and use the parameters, which are passed back in the array currently, but you'd have to do some string parsing to get them with your suggestion...
Andrew