Re: Code Puzzler for the weekend

2012-06-24 Thread Andrew Stitcher
On Sat, 2012-06-23 at 09:06 +1000, Paul Colby wrote: Not sure I understand your question, but assuming it throws, I'd guess it throws an Exception object (exact class depends on the namespace) containing a message like: * when value is 0: Not a valid syslog value: * when value is 1: ot a

Code Puzzler for the weekend

2012-06-22 Thread Andrew Stitcher
Code just noticed in the Qpid C++ codebase: string name(int value) const { ByValue::const_iterator i = byValue.find(value); if (i == byValue.end()) throw Exception(Not a valid syslog value: + value); return i-second; } Assuming that this function

Re: Code Puzzler for the weekend

2012-06-22 Thread Matthew Gillen
On 6/22/2012 6:06 PM, Andrew Stitcher wrote: Code just noticed in the Qpid C++ codebase: string name(int value) const { ByValue::const_iterator i = byValue.find(value); if (i == byValue.end()) throw Exception(Not a valid syslog value: + value);

Re: Code Puzzler for the weekend

2012-06-22 Thread Paul Colby
Not sure I understand your question, but assuming it throws, I'd guess it throws an Exception object (exact class depends on the namespace) containing a message like: * when value is 0: Not a valid syslog value: * when value is 1: ot a valid syslog value: * when value is 100: whatever is in