The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
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.
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.
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.
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.)
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.
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.
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)