E
Ethan Strauss
Guest
Hi,
This is really a complaint, but if there is a good reason, I would like to know...
When C#.net throws a KeyNotFoundException, it doesn't tell you the value of the key which was not found. Why is that? It would be easy to write the exception code to include key.ToString() and, for me at least, it would frequently simplify my debugging.
I find similar things for many exceptions where they seem to supply minimal info about the context of what when wrong. When I throw exceptions I generally try to add as much context as possible.
Thanks,
Ethan
Ethan Strauss
Continue reading...
This is really a complaint, but if there is a good reason, I would like to know...
When C#.net throws a KeyNotFoundException, it doesn't tell you the value of the key which was not found. Why is that? It would be easy to write the exception code to include key.ToString() and, for me at least, it would frequently simplify my debugging.
I find similar things for many exceptions where they seem to supply minimal info about the context of what when wrong. When I throw exceptions I generally try to add as much context as possible.
Thanks,
Ethan
Ethan Strauss
Continue reading...