How many do you want to throw?



  • Here's some macros I found today....

    <font face="courier new,courier">#undef THROW_EXCEPTION0
    #define THROW_EXCEPTION0() <br>  throw()
    #undef THROW_EXCEPTION1
    #define THROW_EXCEPTION1( e0 ) <br>  throw( e0 )
    #undef THROW_EXCEPTION2
    #define THROW_EXCEPTION2( e0, e1 ) <br>  throw( e0, e1 )
    #undef THROW_EXCEPTION3
    #define THROW_EXCEPTION3( e0, e1, e2 ) <br>  throw( e0, e1, e2 )
    #undef THROW_EXCEPTION4
    #define THROW_EXCEPTION4( e0, e1, e2, e3 ) <br>  throw( e0, e1, e2, e3 )
    #undef THROW_EXCEPTION5
    #define THROW_EXCEPTION5( e0, e1, e2, e3, e4 ) <br>  throw( e0, e1, e2, e3, e4 )
    #undef THROW_EXCEPTION6
    #define THROW_EXCEPTION6( e0, e1, e2, e3, e4, e5 ) <br>  throw( e0, e1, e2, e3, e4, e5 )
    #undef THROW_EXCEPTION7
    #define THROW_EXCEPTION7( e0, e1, e2, e3, e4, e5, e6 ) <br>  throw( e0, e1, e2, e3, e4, e5, e6 )
    #undef THROW_EXCEPTION8
    #define THROW_EXCEPTION8( e0, e1, e2, e3, e4, e5, e6, e7 ) <br>  throw( e0, e1, e2, e3, e4, e5, e6, e7 )
    #undef THROW_EXCEPTION9
    #define THROW_EXCEPTION9( e0, e1, e2, e3, e4, e5, e6, e7, e8 ) <br>  throw( e0, e1, e2, e3, e4, e5, e6, e7, e8 )</font>
     

    They actually make the code LONGER and more obscure... wtf? 



  • Binary output through exceptions...

    throw(0)

    throw(1)

    throw(0)

    etc...
     



  • This is probably code which sometimes targets VC++, where there's also a __throw statement which uses SEH. Bit of a WTF that they didn't just

    #define THROW_EXCEPTION throw

    I fear that perhaps they're considering compiling out exceptions in some cases, which is a stupid idea.



  • Maybe they wanted to be able to deactivate throwing execptions by changing the macro? Seems stupid to me.



  • I love code that could be used as Rorschach test. I see an aileron !



  • @aikii said:

    I love code that could be used as Rorschach test.

     I see a sailboat



  • GAHHHHH!!! When is it gonna be MY turn to see the goddamn sailboat!!

     [5 points to anyone else who know where that came from...]

     



  • @MasterPlanSoftware said:

    GAHHHHH!!! When is it gonna be MY turn to see the goddamn sailboat!!

     [5 points to anyone else who know where that came from...]

     

    MasterPlanSoftware eventually saw the sailboat. 



  • @MasterPlanSoftware said:

    GAHHHHH!!! When is it gonna be MY turn to see the goddamn sailboat!!

     [5 points to anyone else who know where that came from...]

    Oh come on! Maybe it's just because I've seen it like 10 times (like all of Smith's other movies), but I thought that was pretty obvious! :)

    *Hoards 5 points* 


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.