Menu

Exception inheritence

2003-06-09
2003-06-09
  • Michael Jarvis

    Michael Jarvis - 2003-06-09

    One thing I noticed in include/alloc_exceptions.h is that you do not specify public or private inheritence for some of the classes.  For example, the shm_page_exception inherits from the base class alloc_exception but you only have:

    class shm_page_exception : alloc_exception {
    ...
    };

    The default level of inheritence for a class, when not specified, is private.  I've been changing this to public, so that exceptions can be caught by catching std::exception.

     
    • Marc Bumble

      Marc Bumble - 2003-06-09

      All should be public inheritence now.  Fixed in CVS.

      Marc

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.