35
a5300
6y

Me: Hey, I need to know when the user double clicked this.

B: It's easy, just put a try catch with DoubleClickException

Me: ...

B: ...

Me: and how about right click?

B: RightClickExce...

Me: Ok. I'm out

Comments
  • 5
    I like exceptions too. I always test if string is number like that

    function isNumber(str){
    try{
    parseInt(str);
    return true;
    } catch(e) {
    return false;
    }
    }
  • 5
    @hack lol that's so wrong 😂
  • 1
    I don’t follow. Can someone fill me in?

    (Trying this new thing where I ask questions when I don’t understand as opposed to going into automatic argument mode calling everyone else wrong)
  • 1
    @eArshdeep

    I worked for a short time on a project where event handling was done with exception. They designed the application to work that way, which is terribly wrong.
  • 0
    @Scipio using exception for any kind of control flow is a bad idea
Add Comment