Is there really such thing as an unknown error?
-
But that would be an unhandled error.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
I disagree - you have detected the error, and analysed it to the best of your ability. Suppose you write code that uses a method in an external class that returns a integer error code, where 0 is ok (old fashioned DOS stylee) then detecting an non-zero is handling the error. If the class is updated to return an error code that wasn't in it when you wrote your software, then it is still an error, just an unknown one. You are handling it by reporting it and failing safe rather than continuing as if all was well.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
-
Its where you are in trouble with your wife and you have to guess what is wrong, as she won't let you know (hence "unknown"). Take the case where she has dreamt that you cheated on her and gives you the silent treatment for a day or so, to pick an example purely at random. You are in error, but you don't know why!
Sort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^]Keith Barrow wrote:
You are in error, but you don't know why!
:laugh: More likely a result of poor error handling. In her mind the error is known, you are a man, which is along the lines of a divide by zero error. :sigh:
It was broke, so I fixed it.
-
Its where you are in trouble with your wife and you have to guess what is wrong, as she won't let you know (hence "unknown"). Take the case where she has dreamt that you cheated on her and gives you the silent treatment for a day or so, to pick an example purely at random. You are in error, but you don't know why!
Sort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^]Keith Barrow wrote:
Take the case where she has dreamt that you cheated on her and gives you the silent treatment for a day or so
Sounds like this just happened to you... :)
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me
-
One of my biggest pet peeves in the software industry is the infamous "An unknown error as occurred". How can this be?? Surely somebody knows something about it, otherwise why is it there? So I ask, is there REALLY such thing as an unknown error? I don't get why this has become the catch all of "I give up, something happened and I'm too lazy to figure out why"
Suppose you write code that uses a method in an external class that returns a integer error code, where 0 is ok (old fashioned DOS stylee) then detecting an non-zero value is handling the error. Suppose you set up a switch to report a sensible error message from the error code as specified by the method spec. If the class is updated to return an error code that wasn't in it when you wrote your software, then it is still an error, just an unknown one. You are handling it by reporting it as an "unknown error" and failing safe rather than continuing as if all was well.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
-
REMEMBER THAT IS A PROGRAMMER THE PERSON WHO WRITE WHATEVER HE WANTS WHEN AN UNHANDLED ERROR OCURRS
What did you say!? I can't hear you very well.
"the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
"No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011) "It is the celestial scrotum of good luck!" - Nagy Vilmos (2011) "But you probably have the smoothest scrotum of any grown man" - Pete O'Hanlon (2012) -
Keith Barrow wrote:
You are in error, but you don't know why!
:laugh: More likely a result of poor error handling. In her mind the error is known, you are a man, which is along the lines of a divide by zero error. :sigh:
It was broke, so I fixed it.
:laugh: :sigh:
All of the books in the world contain no more information than is broadcast as video in a single large American city in a single year. Not all bits have equal value. Carl Sagan
-
But that would be an unhandled error.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
No - an unhandled error would (very often) cause the application to crash, typically with the message "unhandled error . . .") if your lucky enough to get a message. In other words, if we consider the error handling to be a try/catch scenario, there is no catch-all and none of the specific handlers catches it. in C++ we have a what is essentially a catch-all catch(...). An unknown error is, for example, one that is trapped but it's specific nature was not anticipated - but it would still be picked up by the catch-all for your particular language. But what it is is not necessarily know, which, we often refer to as "unknown". This also can be moved a notch to the O/S receiving something so obscure no one thought to make a handler or message for it, so the system throws the 'Unknown error", which, in turn is passed to the application, etc.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"As far as we know, our computer has never had an undetected error." - Weisert
"If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010
-
One of my biggest pet peeves in the software industry is the infamous "An unknown error as occurred". How can this be?? Surely somebody knows something about it, otherwise why is it there? So I ask, is there REALLY such thing as an unknown error? I don't get why this has become the catch all of "I give up, something happened and I'm too lazy to figure out why"
My youngest daughter? Oh you mean software...
VS2010/Atmel Studio 6.0 ToDo Manager Extension
Version 3.0 now available. There is no place like 127.0.0.1 -
Keith Barrow wrote:
Take the case where she has dreamt that you cheated on her and gives you the silent treatment for a day or so
Sounds like this just happened to you... :)
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me
Yep. I always liked the line in Dogma where Bethany's friend suggests she is soundint "a bit militant [about men]. You thinking of joining the other side?". Bethany replies "Couldn't do it, women are insane." You'd only get away with a line like this from a female character, but it was obviously written by a man.
Sort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^] -
My youngest daughter? Oh you mean software...
VS2010/Atmel Studio 6.0 ToDo Manager Extension
Version 3.0 now available. There is no place like 127.0.0.1