Results 1 to 3 of 3

Thread: How do we know in which Sub-Call did the error occured ?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Posts
    110

    Question How do we know in which Sub-Call did the error occured ?

    I have defined a Method on a webform which further calls a long chain of other Inner methods and functions.

    There are chances that error could occur in any of those methods in the chain.

    But the error-trapping and error-logging code is written only on the webform. If an error occurs how can we know exactly in which of the inner function did the error occured ?
    Anis Bombaywala

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    It will be the one at the bottom of the stack trace....or is it the top?

    Just do an experiment. Write a simple app that has about 5 functions. Each one calls the next until you get to the fifth one. At that point, throw an error. Only handle it on the first function. Look at the error message to find the one that you know threw the error. It should be the first method, or the last method shown...just don't remember.


    Better yet, you should catch the errors in every function. Add a message to them, then throw it again so the function higher can catch it.

  3. #3
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196
    try adding the "trace" directive to the top of your aspx page and set it = true It may help shed some light on you prob.
    "And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
    Frank Zappa

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width