The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Exception handling - The Pokémon way

Last post 04-21-2008 8:09 PM by Zemyla. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 04-21-2008 4:18 AM

    • MY1201
    • Not Ranked
    • Joined on 04-21-2008
    • Posts 1

    Exception handling - The Pokémon way

    A friend of mine has made this illustration which shows how they do exception handling at his work. We like to call it "Exception handling - The Pokémon way":

    Exception handling - The Pokémon way

    I don't know if they actually sing the Pokémon theme while coding. Replace "Pokémon" with "Exception" and you're about there.

     

    Best regards

    Soeren 

     

     

  • 04-21-2008 4:29 AM In reply to

    Re: Exception handling - The Pokémon way

    heh, 

    I nominate this the most interesting title in the sidebar ever.

     

  • 04-21-2008 6:35 AM In reply to

    Re: Exception handling - The Pokémon way

     Seconded - it scares me whenever I see this in live code (it's comforting to see ReSharper complain about it though, as that means it doesn't go entirely unnoticed).  (No, not code I've written)

    TRWTF is Sandcastle Builder
  • 04-21-2008 9:28 AM In reply to

    Re: Exception handling - The Pokémon way

    Hmm, I've done this before.  In web apps, it's a good idea to do it at the top level and dump out an error page.  I've used the "Do nothing" variant, too.  It's usually because of exceptions being extensively overused in a piece of code I am integrating. 

    Let the healing begin!

  • I may not agree with everything Morbs just said, but he expresses himself in a way that is dignified, respectful, polite and non-threatening!
  • 04-21-2008 11:41 AM In reply to

    Re: Exception handling - The Pokémon way

    Insert it into your code, so everyone can know what a pro coder you are...


    try {

     foobar();

    } catch (Exception e) {

    //0033@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    //@@00ff@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    //@@33ffff77@@@@@@@@@@@@@@@@@@@@@@33ff0000@@@@@@@@@@
    //@@@@33ffffff@@@@@@@@@@@@@@@@ffffffff00@@@@@@@@@@@@
    //@@@@@@@@ffffffffffffffffKKffffffff33@@@@@@@@ff@@@@
    //@@@@@@@@@@ffffffffffffffffaa00@@@@@@@@@@CCffff00@@
    //@@@@@@@@@@ffffffffffffffffffBB@@@@@@LLffffffffff@@
    //@@@@@@@@@@fQQfffffffffQQffffff@@@@ffffffffffffff00
    //@@@@@@@@00fQQfffffffffQQffffff@@@@ffffffffffWWYY00
    //@@@@@@@@QQffffffrfffffffQQ44ff@@@@00aaYYXX00@@@@@@
    //@@@@@@@@00ffffffffffffPPQQ00ff@@@@@@ffXX@@@@@@@@@@
    //@@@@@@@@@@ccffff~~ffffffffffff@@@@@@@@WW@@@@@@@@@@
    //@@@@@@@@@@ffPPffffffffffffffff33@@ffYYXX@@@@@@@@@@
    //@@@@@@@@@@ffffffffffffffffff00LL@@33TT@@@@@@@@@@@@
    //@@@@@@@@@@ffffffffffffffffffffff@@33DD@@@@@@@@@@@@
    //@@@@@@@@@@ffffffffffffffff00ffff@@88@@@@@@@@@@@@@@
    //@@@@@@@@@@00ffffffffffff00ffff6633DD@@@@@@@@@@@@@@
    //@@@@@@@@@@ffffffffffffffffffffffee@@@@@@@@@@@@@@@@
    //@@@@@@@@@@ffffffffffffffffffffff@@@@@@@@@@@@@@@@@@
    //@@@@@@@@@@YYZZYYXXXXZZffffffffSS@@@@@@@@@@@@@@@@@@
    //@@@@@@@@@@66YY0033@@33XXXXYY00@@@@@@@@@@@@@@@@@@@@
    //@@@@@@@@@@00@@@@@@@@@@@@00SS@@@@@@@@@@@@@@@@@@@@@@
    //
    //           GOTTA   CATCH   EM   ALL

    }

  • 04-21-2008 12:23 PM In reply to

    Re: Exception handling - The Pokémon way

    Bumble Bee Tuna:
    Insert it into your code, so everyone can know what a pro coder you are
    Sweet! Another ASCII graphic code comment. I've yet to use this one as a header because I'm scared our BA will see it one day:
        /*************************************************************
         *                                                           *
         *  .=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.       *
         *   |                     ______                     |      *
         *   |                  .-"      "-.                  |      *
         *   |                 /            \                 |      *
         *   |     _          |              |          _     |      *
         *   |    ( \         |,  .-.  .-.  ,|         / )    |      *
         *   |     > "=._     | )(__/  \__)( |     _.=" <     |      *
         *   |    (_/"=._"=._ |/     /\     \| _.="_.="\_)    |      *
         *   |           "=._"(_     ^^     _)"_.="           |      *
         *   |               "=\__|IIIIII|__/="               |      *
         *   |              _.="| \IIIIII/ |"=._              |      *
         *   |    _     _.="_.="\          /"=._"=._     _    |      *
         *   |   ( \_.="_.="     `--------`     "=._"=._/ )   |      *
         *   |    > _.="                            "=._ <    |      *
         *   |   (_/                                    \_)   |      *
         *   |                                                |      *
         *   '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='      *
         *                                                           *
         *        ABANDON ALL HOPE, ALL YE WHO ENTER HERE            *
         *************************************************************/

    Join us at #TDWTF on irc.slashnet.org !

  • 04-21-2008 12:29 PM In reply to

    Re: Exception handling - The Pokémon way

    AbbydonKrafts:
    I've yet to use this one as a header because I'm scared our BA will see it one day:

    My favorite "hope management doesn't see it" quote: 

    // To navigate through our categories, a form is submitted upon clicking a link, after which the submitted values are taken here and the client is 302'd
    // to the appropriate page.  This is so very, very wrong.  This code could not be more evil if it skull-fucked baby Jesus.  I don't have time to fix it
    // so I'm letting it stand as a monument to human cruelty, like the Holocaust museum or something.  It's fucking taking POST values to do a redirect
    // to a goddamn GET!!!!

    Let the healing begin!

  • I may not agree with everything Morbs just said, but he expresses himself in a way that is dignified, respectful, polite and non-threatening!
  • 04-21-2008 12:44 PM In reply to

    Re: Exception handling - The Pokémon way

    morbiuswilters:
    My favorite "hope management doesn't see it" quote: 
    O_O Whoa! LOL

    Join us at #TDWTF on irc.slashnet.org !

  • 04-21-2008 2:01 PM In reply to

    Re: Exception handling - The Pokémon way

    I wonder what the global exception handler throws at you? 

    Must be somesort of eletric shocks and a custom audio sample shouting "PICACHUUU".

    But then i would think my Windows puter has a new audible virus. 

  • 04-21-2008 4:05 PM In reply to

    Re: Exception handling - The Pokémon way

    I'd think this sort of exception handling would be prone to the occasional MISSINGNO.

    (Yes, I desperately need a life.)

  • 04-21-2008 8:09 PM In reply to

    Re: Exception handling - The Pokémon way

    codeman38:

    I'd think this sort of exception handling would be prone to the occasional MISSINGNO.

    (Yes, I desperately need a life.)

    It is

Page 1 of 1 (11 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems