|
What's in your mind is the worst exception in programming??
My favourite is Out of Memory!
|
|
|
|
|
All of the "something went wrong, but I'm not going to tell you what, why, or even where, neener neener"-Exceptions.
XNA was pretty good at throwing those - often in a manner that the debugger would fail to run.
Actually native code in general is good at that. For example, if anything happens after the stack gets misaligned on win64, things go very wrong.
modified 21-May-13 2:31am.
|
|
|
|
|
In good old days of native c++... now I have moved to managed, atleast the debugger gives me some stack traces... I never learnt how to debug a native app!
|
|
|
|
|
|
object reference not set to an instance of an object
index is outside the bounds of the array
|
|
|
|
|
Those are easy to analyze and fix though..
|
|
|
|
|
Yes they are, but when they happen, it means I screwed up as the developer.
So, I really hate to see them.
"I am rarely happier than when spending entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand."
- Douglas Adams
|
|
|
|
|
Jacquers wrote: object reference not set to an instance of an object
This exception message is not useful at all. It would be nice if it gives the object name.
TOMZ_KV
|
|
|
|
|
Tomz_KV wrote: This exception message is not useful at all. It would be nice if it gives the object name. It would be nice if the computer served up tea and crumpets while it explained the vagaries of the code that put it in this situation, but the fact of the matter is that this is a normal unhandled exception message. It is your responsibility as a developer to throw explanatory errors to the system before general purpose messages crumple it up into a general purpose error message. It should at least give you the stack trace, which tells you where the error occurred and if you read that line, it tells you the object it thought it was when the error occurred and you might even find out what the object really was when it was created if you follow the trace far enough.
All general purpose error messages are an indication that the developer lacked the caring needed to create meaningful error messages in the special situation it was brought to, completely by (the lack of caring by) the developer's hand.
|
|
|
|
|
When try..catch is used, no details will be given.
TOMZ_KV
|
|
|
|
|
|
Both of those exceptions explain what you did and that it is your (the developer's) fault that it happened. If both of them said "You are an effing idiot!", the statement would be true, but not at all helpful about what went wrong. I've worked in languages where you'd never get the first error because there is no such thing as an object and over-indexing an array isn't an error.
I've had scheduled programs that blew up because it had an illegal divide by zero error or illegal instruction. Couldn't for the life of me find out what was wrong with my code. Turned out it was scheduled to run when another code was also running that overindexed its array and rewrote my code's machine language in memory and so my code went crazy.
The operator happened to notice other people's code were blowing up whenever this same program ran.
Jacquers wrote: index is outside the bounds of the array Is a life-saver. Or at least a time-saver because my time isn't wasted when someone else is the idiot. As it is, too many times, that's my role. (IE Idiot programmer.)
|
|
|
|
|
|
I (think I) see what you did there
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
"Given the chance I'd rather work smart than work hard." - PHS241
"'Sophisticated platform' typically means 'I have no idea how it works.'"
|
|
|
|
|
The fact you commented, says you did. Obviously, you and I are more subtle than the others.
|
|
|
|
|
English is my first language and I didn't get it. That or my memory had a stack-overflow problem so I forgot what you meant. I think my memory is on RAM that doesn't get refreshed too often, I forget what I'm
|
|
|
|
|
I'm sure there are lots, however, the one that is currently getting on my nerves is "File not found" being thrown by one of my Python scripts when I try to import a library, despite the fact I damn well know it's installed and working. Python seems very flakey when it comes to libraries, particularly on Windows. One day it works the next it doesn't.
.-.
|o,o|
,| _\=/_ .-""-.
||/_/_\_\ /[] _ _\
|_/|(_)|\\ _|_o_LII|_
\._. |\_/|"` |_| ==== |_|
|_|_| ||" || ||
|-|-| ||LI o ||
|_|_| ||'----'||
/_/ \_\ /__| |__\
|
|
|
|
|
Quote: One day it works the next it doesn't.
Sounds a bit like me!
|
|
|
|
|
"An unexpected error has occured"[^] - you mean, as opposed to a totaly expected error, then?
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
You should expect exceptions whenever you do something which your code can't guarantee to be successful. And you should write code to catch and handle the problems you expect. Whenever an exception lands in a general exception handler, it obviously was not expected and not really handled, just reported.
But I agree, if that's all a program has to say about an error, then the error handling is a little thin.
Sent from my BatComputer via HAL 9000 and M5
|
|
|
|
|
That was about the only error reporting you seemed to get with Microsoft C in the DOS days.
Ot at least, the only reporting I can remember. (I couldn't find an image of the DOS screen, where it was that and an "OK" and "Cancel" button, both of which did the same thing: crash.)
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
And everything we wrote that long ago was better?
Sent from my BatComputer via HAL 9000 and M5
|
|
|
|
|
Well, I at least tried to tell the user what he had done wrong. Most of the time. Some of the time, probably.
But MS didn't even give a nod towards "user friendly" in those days; it was "user hostile" at best, and "outright hatred" at worst.
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
Back in my dark COBOL days "Abnormal abend", that could indicate anything.
When the going gets weird the weird turn pro - Hunter S Thompson RIP
|
|
|
|
|
<shudder>
I'd forgotten that one: OS/360 in my case.
And wasn't the explanation helpfull as well?
"The RTM2WA is pointed to by the TCB of the failing task (field TCBRTWA), and is listed after the abnormally ending TCB."
Why can't you just say "You forgot a comma you idiot" and let us both move on?
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|