locked
Log more for exceptions RRS feed

  • Question

  • User-500258270 posted

    hi,

    i want to know that is there a way by which I can log the values of parameters\arguments with which the method was called, in which the exception is raised?

     

    Means for following code:

     

    public Sub MySub(ByVal arg1 as String, ByVal arg2 as Integer)

    try 

           :

           :

    catch ex as exception

     HandleException(ex)

    end try

     

    I would like to know the values of arg1 and arg2 at the point of catching an exception.

     

    thnx in advance.

     

    Tuesday, May 13, 2008 11:43 AM

Answers

  • User-417784260 posted
    I would modify your handle exception sub routine to allow you to pass the values of arg1 and arg2 to it.  The values are available in MySub but need to be passed to HandleException
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 13, 2008 12:06 PM

All replies

  • User-417784260 posted
    I would modify your handle exception sub routine to allow you to pass the values of arg1 and arg2 to it.  The values are available in MySub but need to be passed to HandleException
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 13, 2008 12:06 PM
  • User-500258270 posted

    Sorry, my mistake.

    I would like to make it generic so that each developer does not have to pass individual args or for that matter a collection of args to the handleException routine.

    and I am more intersted in knowing that are there any properties of the ex(exception object) or any work around like to access some stack or heap on which asp.net stores the

    args(if at all it does).

    Wednesday, May 14, 2008 12:23 AM