Exception safety with exceptions handling

Exception safety with exceptions handling

Post by Valentin Bonnar » Wed, 05 Aug 1998 04:00:00



uncaught_exception() doesn't have a throw specification.

It is intentionnal ? Does it means that one should be prepared
to handle exceptions thrown from uncaught_exception() ?

uncaught_exception() is called in exception handling contexts
where exception safety is very important.

--


info about C++/a propos du C++: http://pages.pratique.fr/~bonnardv/
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]

[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]

 
 
 

1. exception handling not handling

The search function in my linked list returns a null pointer. I am thinking
that this is where I use exception handling.
But... the compiler raises "unhandled exeption error" before I can throw my
failure variable.
Am I missing something painfully obvious?

Any guidance appreciated!

    try   // if search fails returns a null pointer
    {
        int failure = 0;

     if ((temp = theList.findList(theKey)->prop) == NULL)
     {
      throw failure ;
     }
    }
     catch (int i)
     {
      cout << "not found" << endl;
     }

    theList.displayList(temp);

2. Q: How do I get typewriter in boldface ?

3. Exception handling w/ repeated handling code

4. EFS

5. Exception safety of implicit assignment operator

6. Alpha UDB 166MHz - Price estimation please.

7. C++ stack overflow and exception safety

8. Cisco security bug

9. Exception safety - an elegant solution?

10. definition of exception safety?

11. C++ stack overflow and exception safety

12. operator=() exception safety

13. Exception safety of a method