Skip to main content
56 events
when toggle format what by license comment
May 30 at 14:35 answer added Cort Ammon timeline score: 1
May 30 at 13:49 comment added freakish I don't think that "being an exception" is relevant here. The same question can be asked about any form of error messages. For example Unix syscalls and their error messages: what a joke.
Jul 13, 2022 at 13:36 comment added Ian Boyd If the security of your system depends on obscuring details of you system: you have no security.
Jan 21, 2022 at 21:51 history edited Martin Ba
edited tags
Sep 21, 2021 at 22:25 answer added supercat timeline score: 1
Oct 9, 2020 at 14:21 answer added Phill W. timeline score: 2
Oct 8, 2020 at 19:44 comment added siegi @JørgenFogh, FYI, Java recently added more helpful NullPointerExceptions with JEP 358 in Java 14.
Oct 8, 2020 at 17:24 history edited Deduplicator CC BY-SA 4.0
deleted 47 characters in body; edited tags
Apr 12, 2017 at 7:31 history edited CommunityBot
replaced http://programmers.stackexchange.com/ with https://softwareengineering.stackexchange.com/
Apr 19, 2015 at 16:47 comment added Jackson Ray Hamilton @Telastyn's argument is distracting. It is true that the internals of the system should not be exposed to users, but that does not imply that error messages must not contain any useful information. Just don't send the errors to the client in production. e.g. on all PHP installs I've used, the default setting is display_errors = Off.
Apr 16, 2015 at 1:17 comment added HorusKol @MasonWheeler - not all computer users are computer owners - company machines used by one or more employees, for example.
Apr 15, 2015 at 11:13 answer added Odalrick timeline score: 1
Apr 14, 2015 at 21:12 answer added Stu Pegg timeline score: 3
Apr 14, 2015 at 17:30 history protected gnat
Apr 14, 2015 at 15:31 comment added Jørgen Fogh @anaximander: It would actually have been possible to give more useful information in NREs when the platform was originally designed. The VM could easily have added "An instance of type IFoo was expected." I would have liked to have that information.
Apr 14, 2015 at 14:38 comment added Moby Disk Many programmers with C backgrounds use exceptions like they used error error codes: static and immutable. They forget that exceptions can be built-up at runtime. Hence "File not found" instead of "file %s not found."
Apr 14, 2015 at 9:44 comment added anaximander @MichaelKjörling I totally agree; just pointing out that it's not always the fault of the developer. Sometimes the reason there's no info is because they can't tell you, regardless of how frustrating it is to not know what was null (for example).
Apr 14, 2015 at 9:41 comment added user @anaximander While it is certainly true that in some cases it's not possible to provide more details in a meaningful manner, that does not preclude the possibility of providing additional details when doing so is practical.
Apr 14, 2015 at 8:59 comment added anaximander It's worth noting that in some cases it's not possible to give much useful info - see the (in)famous case of NullReferenceException in C#.
Apr 14, 2015 at 8:52 answer added Bent timeline score: 3
Apr 14, 2015 at 7:03 answer added Basile Starynkevitch timeline score: 3
Apr 14, 2015 at 6:52 answer added Randy timeline score: 4
S Apr 14, 2015 at 2:33 history edited user22815 CC BY-SA 3.0
Copy edited.
S Apr 14, 2015 at 2:33 history suggested Peter Mortensen CC BY-SA 3.0
Copy edited.
Apr 14, 2015 at 2:31 review Suggested edits
S Apr 14, 2015 at 2:33
Apr 14, 2015 at 0:37 review Close votes
Apr 17, 2015 at 8:58
Apr 13, 2015 at 19:39 vote accept Martin Ba
Apr 13, 2015 at 17:47 history tweeted twitter.com/#!/StackProgrammer/status/587673537311334400
Apr 13, 2015 at 17:13 answer added Zibbobz timeline score: 14
Apr 13, 2015 at 17:04 comment added usr There's always some additional info that you would like to have. I find the messages that you give as examples to be quite good. You can debug the problem with them. Far better than "error 0x80001234" (example inspired by Windows Update).
Apr 13, 2015 at 17:03 comment added Zibbobz @MasonWheeler In that case you the developer should be adding those error messages in, and not relying on the default error messages.
Apr 13, 2015 at 16:13 answer added Mike Nakis timeline score: 233
Apr 13, 2015 at 15:58 comment added Robert Harvey @BenAaronson: Now it does. (it also says that in the body of the question).
Apr 13, 2015 at 15:57 history edited Robert Harvey CC BY-SA 3.0
edited title
Apr 13, 2015 at 15:57 comment added Ben Aaronson @RobertHarvey I agree with that point, but since ArgumentOutOfRange doesn't expose the argument value as either a message or property, I'm not sure I see the relevance to this example. The question title says "Exceptions", not "Exception messages"
Apr 13, 2015 at 15:54 answer added Telastyn timeline score: 48
Apr 13, 2015 at 15:52 comment added Ben Aaronson @RobertHarvey What?! How is "negative or greater than Size-1" two values? Especially when Size is potentially only known at runtime. Debugging's great if you have a relatively good understanding of the bug or at least repeatable steps to reproduce, but it's wildly optimistic to assume that every bug reported based on a stack trace and Exception type will automatically be: a) Trivial to understand/reproduce or b) Just so happen to occur on a developer's machine while they're debugging
Apr 13, 2015 at 15:52 comment added Lie Ryan @RobertHarvey: knowing what the number exactly can be helpful during development, for example, if you know that you're passing save(age=42,favcolor=2) to a function and you get "ArgumentsOutOfRange: 42 is not a valid index for favoriteColor List", you'll immediately know where to look as the bug is likely related to the age variable instead of having to dig into the debugger to find what the value is. It can be especially worse if there are random values involved as you might have to wait until you stumble upon the right random values again.
Apr 13, 2015 at 15:41 answer added user22815 timeline score: 7
Apr 13, 2015 at 15:30 history reopened Mason Wheeler
Martin Ba
Robert Harvey
user22815
durron597
Apr 13, 2015 at 15:15 history edited yannis CC BY-SA 3.0
deleted 138 characters in body
Apr 13, 2015 at 15:10 comment added user22815 Related reading: How to write a good exception message and What is the proper response to lousy error message?
Apr 13, 2015 at 15:01 review Reopen votes
Apr 13, 2015 at 15:33
Apr 13, 2015 at 15:00 comment added Robert Harvey I suspect the answer to your question is "because that's what debugging is for." Also, some exceptions are caught and rethrown. Look in the InnerException property of the exception object for more details.
Apr 13, 2015 at 14:46 history edited Martin Ba CC BY-SA 3.0
using Snowman's revised phrasing
Apr 13, 2015 at 14:46 comment added Mason Wheeler @Snowman: Yes, that's exactly the point of my original comment.
Apr 13, 2015 at 14:46 history rollback Martin Ba
Rollback to Revision 2
Apr 13, 2015 at 14:45 history edited Martin Ba CC BY-SA 3.0
re -added changed title
Apr 13, 2015 at 14:44 history rollback Martin Ba
Rollback to Revision 1
Apr 13, 2015 at 14:42 comment added Mason Wheeler @Snowman: What's inaccessible to the user if it's client-side software? The owner of the machine owns the machine and can get at anything.
Apr 13, 2015 at 14:32 history closed user40980
user22815
Blrfl
Dan Pichelman
gnat
Opinion-based
Apr 13, 2015 at 14:31 comment added Telastyn @MasonWheeler - it's old (~12 years now), but back when I worked at Symantec, there was an interesting stat about attacks - 80% originated from the inside of the network. Your system is always open to the disgruntled IT guy or the mischievous new hire. (not that I necessarily agree with this justification for shoddy exception messages).
Apr 13, 2015 at 14:30 history edited user22815 CC BY-SA 3.0
Changed language to be less ranty.
Apr 13, 2015 at 14:27 comment added Mason Wheeler @Telastyn: Only if your system is open to attackers. If you're running a Web server, for example, you want to serve up bland error messages to the end-user, but you still want very detailed error messages to get logged at your end. And on client-side software, where the user is not an attacker, you definitely want those error messages to be as detailed as possible, so that when something goes wrong and you get sent a bug report, you have as much information to work with as possible, because a lot of times that's all you get.
Apr 13, 2015 at 14:23 comment added Telastyn It should be noted that from the side of security professionals, "error messages should contain no details about the internals of the system" is a rule of thumb.
Apr 13, 2015 at 14:21 history asked Martin Ba CC BY-SA 3.0