Closed rickihastings closed 10 years ago
Due to the nature of irc-message (it's designed as an object to be instantiated via new
) this isn't really possible. If you have an idea as to an alternative way to handle parsing errors, shoot.
Maybe passing a boolean into it to determine whether to throw or return false.
On 6 Dec 2013, at 16:55, Fionn Kelleher notifications@github.com wrote:
Due to the nature of irc-message (it's designed as an object to be instantiated via new) this isn't really possible. If you have an idea as to an alternative way to handle parsing errors, shoot.
— Reply to this email directly or view it on GitHub.
I can't return false, only an object of some sort. I could probably
return new Boolean(false);
Actually yeah that's a bit horrible. Maybe just return a valid message object but with one param which is the line that was sent? Or something.
On 6 Dec 2013, at 20:25, Fionn Kelleher notifications@github.com wrote:
I can't return false, only an object of some sort. I could probably
return new Boolean(false); — Reply to this email directly or view it on GitHub.
Allow the option to be set somewhere to just return false or null instead of throwing errors.