• (cs)
    Alex Papadimoulis:

    That explained why they never really had problems with the service before. And fortunately, they won't be experiencing any failures any time soon; only success.


    <font face="tahoma,arial,helvetica,sans-serif">It's like hiding all the dust under the carpet... Until the carpet can hold no more and you can't do anything about it but throw it away... ahh... success!



    </font>
  • anonymous (unregistered) in reply to CodeReaper
    CodeReaper:
    They key here is, DON'T PANIC... (the people who pay us).

    For production I disable assertions. And add a catch event that capture all exceptions and ignore it.
     

  • (cs)

    Does anyone else wonder about this:

    HTTP request sent, awaiting response ... 403 Not Allowed
    11:17:04 ERROR 403: Unknown Service

    403 doesn't mean the requested URL (service in this case) doesn't exist, it means you don't have access... A 404 would mean it doesn't exist.

    I wonder why this reponse goes from "403 Not Allowed" (which is accurate) to "403 Unknown Service" (which makes no sense)...

    I write webapplications and it's quite common NOT to display errors. In case it's a serious error, show a page that explains that there was an error without going into detail. If it's an error that will have no impact on the functioning of the application, just ignore it - as far as the user is concerned. The errors will be logged however and serious errors (database unavailable 'n such) will be mailed to the administrator.

    Ofcourse, the example completely ignores the error without any apparent logging, and pretending that a service executed succesfully if the service doesn't exist (or isn't allowed) is a big WTF.

    Coditor

  • (cs) in reply to Dazed

    Anonymous:
    So let's get this straight - the vendor was allowed to update the production machine directly? Without going through any form of test environment first? Without informing the company? But when it blew up it was the company's own staff who had to track down the problem?

    Unfortunately, that sounds all too familiar. A couple of times on my current project the first we've known of a planned change to production is when the client happens to mention that $thirdParty will be at $hostingCentre in a couple of days time.

     Thankfully, we've managed to prevent it each time so far, and have expressed our disappointment at this circumvention of established process...
     

  • (cs) in reply to cconroy
    cconroy:

    This would make a great management slogan (you know, for morale-boosting and such):

     "Success is not an option."

     OT, but this reminds me of the slogan of a local gasoline company "Quality is not an option"

    I'm serious.

     

  • (cs) in reply to lomaxx

    Double post

  • (cs) in reply to lomaxx
    lomaxx:

    Reminds me of a function a co-worker of mine once wrote:

     

    if (value==true)
    {

        return true;

    }
    else
    {

        return 1;

    }

     or just rewrite this as

     
    

    if(value || !value)

    {

         return true;

    }

     

  • APAQ11 (unregistered)

    try{

    DoSomething("Not Useful"); 

    }

    Catch(Exception E){

    // Ha Ha Suckers... we sold you a bum service! Good luck finding out it doesn't work!

    }

  • bool (unregistered) in reply to SomebodyElse

    Trying to increase the readability a bit... 

    if (value == false && value != true)
    {
     // Just to be on the safe side...
       return (value == false) ? false : true;
    }
    else if (value != false && value == true)
    {
      return (value == true) ? true : false;
    }
    else
    {
     // value is not false and not true... hmm, assume EOF
     return EOF;
    }
     


  • Jon (unregistered) in reply to JWick
    Anonymous:

    I always wondered how they could get these kinds of error messages until i got one in a soft i wrote. 
    I remember saying out loud in the office : "WTF !! Error: No Error ??"
    My coworkers came to check and we had a good laugth :D
    Once upon a time, when I was writing some code that read from an Excel file, I wrote an error message that said, "Missing data found." I caught it during testing, thankfully.
  • Guything McThingGuy (unregistered)

    I won't say "What's the WTF here?", because I see it.

    But I completely understand the vendor's actions.  There was a big looming bug in the first place, someone tried to fix it by actually handling exceptional cases, and ended up breaking something that relied on the big looming bug.  It seems to me the reasonable action is to send out a quick fix by re-adding the "bug" that has a known behaviour, rather than trying out new code - especially if a production machine is down.

    Perhaps the WTF is that the vendor actually came out and admitted to the root cause?

    I would expect this to be a quick fix that ultimately is replaced by handling exceptions correctly, but that could be a major change in architecture, so this seems like a reasonable duct-tape solution in the meantime.

     

  • Martin (unregistered) in reply to Guything McThingGuy

    How about this... guarantees no error EVER!!!

     

    <font size="1">

    <font color="#0000ff" size="1">static</font><font size="1"> </font><font color="#0000ff" size="1">void</font><font size="1"> Main()

    {

    <font color="#008000" size="1">//Code here</font>

    </font>

    </font><font color="#0000ff" size="1">static</font><font size="1"> </font><font color="#0000ff" size="1">void</font><font size="1"> Main()

    {

    <font color="#008000" size="1">//Code here</font>

    </font><font color="#008000" size="1">//Code here</font>

    <font color="#008000" size="1">//set up the error handler to handle EVERYTHING</font>

    <font size="1">

    <font color="#008080" size="1">ErrorHandler</font><font size="1"> eh = </font><font color="#0000ff" size="1">new</font><font size="1"> ErrorHelper.</font><font color="#008080" size="1">ErrorHandler</font><font size="1">();

    <font color="#008080" size="1">Application</font><font size="1">.Run(</font><font color="#0000ff" size="1">new</font><font size="1"> </font><font color="#008080" size="1">MainShell</font><font size="1">(eh));

    }

     

    </font>

    </font>

    </font><font color="#008080" size="1">ErrorHandler</font><font size="1"> eh = </font><font color="#0000ff" size="1">new</font><font size="1"> ErrorHelper.</font><font color="#008080" size="1">ErrorHandler</font><font size="1">();

    <font color="#008080" size="1">Application</font><font size="1">.Run(</font><font color="#0000ff" size="1">new</font><font size="1"> </font><font color="#008080" size="1">MainShell</font><font size="1">(eh));

    }

     

    </font>

    </font><font color="#008080" size="1">Application</font><font size="1">.Run(</font><font color="#0000ff" size="1">new</font><font size="1"> </font><font color="#008080" size="1">MainShell</font><font size="1">(eh));

    }

     

    </font><font color="#0000ff" size="1">

    public<font size="1"> </font><font color="#0000ff" size="1">class</font><font size="1"> </font><font color="#008080" size="1">ErrorHandler</font>

    </font><font size="1"> </font><font color="#0000ff" size="1">class</font><font size="1"> </font><font color="#008080" size="1">ErrorHandler</font><font size="1">

    {

    </font><font size="1">

    <font color="#0000ff" size="1">public</font><font size="1"> ErrorHandler()

    {

    <font color="#008000" size="1">// Adds the event handler to to the main ui exeption</font>

    </font>

    </font><font color="#0000ff" size="1">public</font><font size="1"> ErrorHandler()

    {

    <font color="#008000" size="1">// Adds the event handler to to the main ui exeption</font>

    </font><font color="#008000" size="1">// Adds the event handler to to the main ui exeption</font><font size="1">

    <font color="#008080" size="1">Application</font><font size="1">.ThreadException += </font><font color="#0000ff" size="1">new</font><font size="1"> </font><font color="#008080" size="1">ThreadExceptionEventHandler</font><font size="1">(</font><font color="#0000ff" size="1">this</font><font size="1">.OnThreadException);</font>

    </font><font color="#008080" size="1">Application</font><font size="1">.ThreadException += </font><font color="#0000ff" size="1">new</font><font size="1"> </font><font color="#008080" size="1">ThreadExceptionEventHandler</font><font size="1">(</font><font color="#0000ff" size="1">this</font><font size="1">.OnThreadException);</font>

    <font size="1"> }</font>

    <font size="1">

    <font color="#0000ff" size="1">public</font><font size="1"> </font><font color="#0000ff" size="1">void</font><font size="1"> OnThreadException(</font><font color="#0000ff" size="1">object</font><font size="1"> sender, </font><font color="#008080" size="1">ThreadExceptionEventArgs</font><font size="1"> t)

    {

     

    </font>

    </font><font color="#0000ff" size="1">public</font><font size="1"> </font><font color="#0000ff" size="1">void</font><font size="1"> OnThreadException(</font><font color="#0000ff" size="1">object</font><font size="1"> sender, </font><font color="#008080" size="1">ThreadExceptionEventArgs</font><font size="1"> t)

    {

     

    </font>

    <font size="1">}</font>

    <font size="1"></font>

  • George W. Bush (unregistered)

    Works for me! Heh.

  • Papa Lazarou (unregistered)

    What's all this try / catch madness?  I got four words for ya.

    On Error Resume Next

     

Leave a comment on “Define Failure As Success”

Log In or post as a guest

Replying to comment #:

« Return to Article