throw exception in the finalize

Discussion in 'ASP .Net' started by z. f., Jul 5, 2004.

  1. z. f.

    z. f. Guest

    in vb asp.net page i'm overriding the finalize method in order to make
    cleanup.
    if i throw exception there it is not seen on the page.
    probably because the page has already sent to the client.
    is there a way to throw exception on the finalize method in order to check
    that objects were closed, but how do i trace this exception?

    TIA, z.
    z. f., Jul 5, 2004
    #1
    1. Advertising

  2. z. f.

    avnrao Guest

    hi z.f.
    I dont know your requirement clearly but based on the fact of finalizer..you
    dont have control as to when it gets called. hence try avoid finalization
    usage
    and use IDisposable interface implementation instead.

    Av.


    "z. f." <> wrote in message
    news:...
    > in vb asp.net page i'm overriding the finalize method in order to make
    > cleanup.
    > if i throw exception there it is not seen on the page.
    > probably because the page has already sent to the client.
    > is there a way to throw exception on the finalize method in order to check
    > that objects were closed, but how do i trace this exception?
    >
    > TIA, z.
    >
    >
    avnrao, Jul 5, 2004
    #2
    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. Kerri
    Replies:
    2
    Views:
    13,018
    Kevin Spencer
    Oct 27, 2003
  2. Replies:
    15
    Views:
    7,528
    Roedy Green
    Sep 8, 2005
  3. Emanuele D'Arrigo

    To throw or to throw not?

    Emanuele D'Arrigo, Nov 14, 2008, in forum: Python
    Replies:
    6
    Views:
    318
    Emanuele D'Arrigo
    Nov 15, 2008
  4. andrey
    Replies:
    0
    Views:
    160
    andrey
    Dec 15, 2007
  5. Andrey Nikitin
    Replies:
    1
    Views:
    166
    Nobuyoshi Nakada
    Dec 16, 2007
Loading...

Share This Page