none
Exceptions within methods

    Question

  • When I have a boneheaded mistake inside a method that throws an exception, visual studio points to the call to the method, not to the line inside the method where I screwed up. For instance, I mistakenly tried to access element 5 of a 5 element array. VS gives me a dope slap on the call to the bogus method:

    ScrewyMethod();

    not the line inside where the mistake is:

    element[one_too_many] = 14;

    when, of course, the last element of the array is 4.

    Is this a setting somewhere?

    Wednesday, May 15, 2019 7:55 PM

Answers

  • Oh. Never mind!

    I was reading the Stack Trace upside down and looking at the bottom entry, not the top.

    (Did I say it's a boneheaded mistake?)

    • Marked as answer by Tom Ruby Wednesday, May 15, 2019 7:59 PM
    Wednesday, May 15, 2019 7:59 PM