Closed jjYBdx4IL closed 8 years ago
Does it actually prevent you from doing things, though? I was pretty sure that didn't block anything.
well, it crashes XD
It actually fully crashes? Are you sure? I'd like to see a log with the inputs and outputs as well, to confirm it's actually failing and not continuing on after dropping off the exception.
builder.listenInput(in -> System.out.println("[I] "+in)).listenOutput(out -> System.out.println("[O] "+out);
I'm only asking so much because I recently tested on twitch.
oh yes, you are correct. still, can we get rid of the exception? :)
Though I'm open to a discussion on this, my opinion is that it is a valid exception. The IRC server is sending an invalid message, so KICL is just responding to receiving unexpected (lack of ) information.
Really though. Open to discussion.
I'm in favor of having KICL throw the error, because having that in the case that the server is actually making a mistake (or something similar) is helpful. Perhaps a method of disabling certain errors/warnings would be nice though?
@AKPWebDesign the exception KittehServerMessageException
is used just for situations where the server has done something that KICL considers... problematic. So,for your approach, you could just ignore those.
Seems easy enough to me.
Would a separate exception be useful for this? I haven't investigated the issue, but if we expect the exception but there are also other causes that could trigger it you don't want to ignore, maybe separating them is wanted.
Really depends on how you'd pick up on it. It may just not be possible. (Knowing twitch, KICL's exceptions are probably all over the place.)
no idea, I have implemented my own down-stripped, minimal twitch irc client now because of that. Maybe you need some "compat mode" for Kitteh, that just expects the absolute minimum for operation.
@jjYBdx4IL I'm confused. Are you saying you wrote an entire minimal IRC client just because KICL complained about invalid input, even though it continued to work fine?
not "entire", just a socket reader that feeds events to listeners.
The library complains about a missing server version during greeting or so.