Exception types thrown by delete?

Discussion in 'C++' started by Dill Hole, Jul 6, 2003.

  1. Dill Hole

    Dill Hole Guest

    What type of exceptions can delete throw? I am catching the exception
    with (...) but I would like to know the explicit exception to catch.

    TIA
     
    Dill Hole, Jul 6, 2003
    #1
    1. Advertisements

  2. On Sat, 05 Jul 2003 19:53:36 -0700, Dill Hole <> wrote:

    >What type of exceptions can delete throw?


    operator delete doesn't throw exceptions by itself. But a
    deleted object's destructor may throw an exception, even
    though that practice is generally regarded as unsound.


    > I am catching the exception with (...) but I would like
    >to know the explicit exception to catch.


    There is a possibility that you're using Visual C++ where
    catch(...) catches both C++ exceptions and native Windows
    exceptions (SEH exceptions).

    The best course of action is to correct the bug instead of
    catching the exception.

    I suggest you use a debugger.


    Hth.
     
    Alf P. Steinbach, Jul 6, 2003
    #2
    1. Advertisements

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. Tom
    Replies:
    1
    Views:
    510
    Munsifali Rashid
    Dec 11, 2003
  2. =?Utf-8?B?U3Rhbg==?=

    Exception of type System.OutOfMemoryException is thrown

    =?Utf-8?B?U3Rhbg==?=, Feb 16, 2004, in forum: ASP .Net
    Replies:
    11
    Views:
    28,484
    Ken Cox [Microsoft MVP]
    Dec 28, 2004
  3. Selen
    Replies:
    0
    Views:
    2,882
    Selen
    May 28, 2004
  4. Ryan
    Replies:
    0
    Views:
    2,274
  5. =?Utf-8?B?U1RlY2g=?=

    External component has thrown an exception

    =?Utf-8?B?U1RlY2g=?=, Mar 14, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    15,640
    Steven Cheng[MSFT]
    Mar 15, 2005
  6. =?Utf-8?B?VmFs?=
    Replies:
    0
    Views:
    3,346
    =?Utf-8?B?VmFs?=
    Jun 8, 2005
  7. jobs
    Replies:
    1
    Views:
    2,059
    Scott Roberts
    Nov 16, 2007
  8. Val
    Replies:
    0
    Views:
    358
Loading...