• Random (unregistered) in reply to anonymouse

    Is there any way to not duplicate that everywhere?

    I'm thinking something like (pseudocode)

    function interpretError(Exception ex) { try { throw ex } catch (UnknownHostException uhe) { // show user nice message } catch (NoRouteToHostException nrthe) { // show user nice message } catch (ConnectionException ce) { // show user nice message } catch (IOException ioe) { // something else } }

  • Look at me! I'm on the internets! (unregistered) in reply to Russ
    Russ:
    The real wtf is that www.thedailywtf.com no longer directs here. Way to go alex.

    drop the www

    http://thedailywtf.com still redirects

  • (cs) in reply to Anon
    Anon:
    Malfist:
    Someone explain this one
    This actually demonstrates something I hate about Java's exception set up: it's nearly impossible to give the user a useful error message. So instead you wind up just dumping the exception on them in the hopes that someone, somewhere, can figure out what's causing it.

    This has nothing to do with Java's exception set up. Since you can create your own exception types, you can pass any information you want back with the exception, including useful error messages.

    Now it's possible that the error is coming from some library that refuses to give you useful information, but that's not the fault of exceptions in general.

  • Look at me! I'm on the internets! (unregistered) in reply to Random

    how about:

    private void disambiguateException(IOException ioe) { if (ioe instanceOf UnknownHostException) System.out.println("You are dump and mispelled the URL"); ... etc. }

    No need to rethrow

  • Look at me! I'm on the internets! (unregistered) in reply to Look at me! I'm on the internets!
    Look at me! I'm on the internets!:
    how about:

    private void disambiguateException(IOException ioe) { if (ioe instanceOf UnknownHostException) System.out.println("You are dump and mispelled the URL"); ... etc. }

    No need to rethrow

    That was meant to be a reply to Random's question about encapsulating the exeception handling.

  • (cs) in reply to Look at me! I'm on the internets!
    Look at me! I'm on the internets!:
    "You are dump ...")

    Guess this will only confuse the user more... :P

  • Even more anonymous coward (unregistered) in reply to Anonymous Coward
    Anonymous Coward:
    "You are dump and spelled the hostname wrong."

    You are dumb and spelled 'dumb' wrong.

    Maybe you are dump and spelled 'dump' wrong. No? Ok, was worth a try though.

  • (cs) in reply to John Cowan
    John Cowan:
    504 That type/mode/structure is obsolete quite.

    Hilarious.

    But these SMTP exchanges are a bit more famous:

    220-NIC.DDN.MIL SMTP Service 6.1 at Fri, 26 Jul 91 18:21:06 PDT 220 Don't Worry. helo nonesuch.noao.edu 250 NIC.DDN.MIL - Never heard of that name, bordeaux.kpno.noao.edu helo cc.utah.edu 250 NIC.DDN.MIL - You are a charlatan, bordeaux.kpno.noao.edu quit 221 NIC.DDN.MIL -- Be Happy!

    And, of course...

    220 deskpro.sow.econ.vu.nl Server SMTP (Complaints/bugs to: postmaster) helo foo.bar 250 deskpro.sow.econ.vu.nl - Liar, Liar! Pants on Fire! quit 221 deskpro.sow.econ.vu.nl says goodbye to kappl.cs.vu.nl at Tue Jul 30 22:13:43.

    (From the really old file.) Just to show that messing with protocol-level response messages is a time-honoured tradition that persists even to this day. =)

  • (cs)

    In live code where I work, I've come across an event handler for Application Domain Unhandled Exception (whatever the default name VS05 gives such a thing) which does the following: System.Console.Out.WriteLine("I am sad")

    I've never seen it happen though, as there's other things that seem to take care of any unhandled exceptions.

  • Henry (unregistered)

    My all-time favorite error mesage was from an old Mac version of Eudora. One day I was typing alng without looking at the screen and hadn't noticed that all of the Eudora windows were closed. Eudora noticed however and came up with the pithy comment "You Might As Well Stop Typing Because Nobody is Listening".

    Wonderfully insulting.

  • tirso bbb (unregistered)

    this happened to our lil' softhouse once, some smartass code monkey (who got fired for incompetence later) wrote on one error window: "a really terrible error has occurred, call the firefighters!" that mofu...

  • 1389 (unregistered) in reply to s

    I blogged about this a recent encounter with exactly this type of message - on my tiny little cell phone screen, of all places:

    http://moblog1389.blogspot.com/2007/04/oops-that-wasnt-supposed-to-happen-c.html

    Captcha: gotcha (yep!)

  • 1389 (unregistered) in reply to Even more anonymous coward

    LOL...good one!

  • tomfin (unregistered) in reply to Anonymous Coward
    Anonymous Coward:
    "You are dump and spelled the hostname wrong."
    You are dumb and spelled 'dumb' wrong.

    No need for names - Dump is valid... haven't you ever taken a dump?

    Award yourself a dump for being mean, turd.

  • Derekwaisy (unregistered)
    Comment held for moderation.
  • Jimmyanten (unregistered)

    prednisone 20mg online: https://prednisone1st.store/# prednisone 30

Leave a comment on “Classics Week: I Hate You”

Log In or post as a guest

Replying to comment #:

« Return to Article