Re: bizaar exception that isn't really an exception

Discussion in 'ASP .Net' started by jeff, Jun 24, 2003.

  1. jeff

    jeff Guest

    well, threadabortexception didn't mention anything about response.redirect,
    that's why i didn't see anything.

    but, thanks for the info, that would explain it... sort of... why doesn't
    this exception get caught in the debugger? ie, break on all errors is
    selected, but this error isn't caught.

    jeff

    "Scott" <> wrote in message
    news:...
    > As Jason said: take a look at ThreadAbortException (and also
    > response.redirect).
    >
    > The following are taken from the MSDN Help:
    >
    > HttpResponse.Redirect(string):
    > Redirect calls End which raises a ThreadAbortException exception upon
    > completion.
    >
    > ThreadAbortException:
    > When a call is made to the Abort method to destroy a thread, the
    > common language runtime throws a ThreadAbortException.
    > ThreadAbortException is a special exception that can be caught, but it
    > will automatically be raised again at the end of the catch block.
    >
    > I hope that helps.
    > Scott
    >
    > "jeff" <> wrote in message
    > news:...
    > > happens when you issue thread.abort on a thread. this isn't

    > happening.
    > > it's a single thread and nowhere do i do any thread controls.
    > >
    > > jeff
    > >
    > > "Jason" <987654321> wrote in message
    > > news:...
    > > > no offense here but you really should read up on

    > ThreadAbortException and
    > > > its siblings
    > > >
    > > >
    > > > "jeff" <> wrote in message
    > > > news:...
    > > > > i am using asp .net 1.1. i am having a very strange problem. i

    > had a
    > > > batch
    > > > > of code that was working great. i made a couple of changes and

    > i
    > > noticed
    > > > it
    > > > > was always throwing an exception. i worked on it and below is

    > the code
    > > in
    > > > > the event that causes the pseudo exception. here is the strange

    > thing -
    > > i
    > > > > have my debugger set to break on all errors regardless of

    > whether it is
    > > > > handled or not. it never breaks into the debugger. the

    > exception
    > > > reported
    > > > > is "thread is aborting" or something like that. this is bogus

    > because
    > > i'm
    > > > > not running a multi-threaded app! so, since i was convinced

    > this was a
    > > > > bogus error, i moved the response.redirect outside of the

    > try/catch
    > > block
    > > > > and it worked fine. can anybody explain this to me? also, this

    > code
    > > used
    > > > > to work fine.
    > > > >
    > > > > ' try to get data
    > > > > Try
    > > > >
    > > > > ' if made it this far, redirect to the report page.
    > > > >
    > > > > Response.Redirect("report.aspx")
    > > > >
    > > > > Catch ex As Exception
    > > > >
    > > > > ' set error condition to prompt user
    > > > >
    > > > > Session.Item(clsConstants.clsSession.MAIN_ERROR) = True
    > > > >
    > > > > Session.Item(clsConstants.clsSession.EXCEPTION) = ex
    > > > >
    > > > > DisplayError(Session.Item(clsConstants.clsSession.EXCEPTION),

    > Page,
    > > True)
    > > > >
    > > > > End Try
    > > > >
    > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    jeff, Jun 24, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jeff
    Replies:
    3
    Views:
    1,689
    Scott
    Jun 26, 2003
  2. Amir
    Replies:
    3
    Views:
    595
  3. TN Bella
    Replies:
    0
    Views:
    476
    TN Bella
    Jul 2, 2004
  4. Nik Coughlin

    brucie isn't really dead is he?

    Nik Coughlin, Oct 2, 2006, in forum: HTML
    Replies:
    1
    Views:
    348
    Toby Inkster
    Oct 2, 2006
  5. Ralf Müller

    serializing webcontrols isn't really a good practice - is it?

    Ralf Müller, Dec 13, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    138
    Teemu Keiski
    Dec 19, 2004
Loading...

Share This Page