You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2010/01/08 19:46:18 UTC

[jira] Closed: (AMQCPP-276) Please declare destructor to be protected in UncaughtExceptionHandler

     [ https://issues.apache.org/activemq/browse/AMQCPP-276?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish closed AMQCPP-276.
-------------------------------

    Resolution: Duplicate

Duplicate of AMQCPP-275

> Please declare destructor to be protected in UncaughtExceptionHandler
> ---------------------------------------------------------------------
>
>                 Key: AMQCPP-276
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-276
>             Project: ActiveMQ C++ Client
>          Issue Type: Wish
>          Components: Decaf
>    Affects Versions: 3.1
>         Environment: Linux GCC
>            Reporter: Jim Lloyd
>            Assignee: Timothy Bish
>            Priority: Minor
>
> Please consider adding a protected destructor to UncaughtExceptionHandler. In source file src/main/decaf/lang/Thread.h, add the two lines highlighted with 'TO BE ADDED' below:
>         class UncaughtExceptionHandler {
>         public:
>             /**
>              * Method invoked when the given thread terminates due to the given uncaught exception.
>              *
>              * This method is defined to indicate that it will not throw an exception, throwing
>              * and exception from this method will on most systems result in a segmentation fault.
>              */
>             virtual void uncaughtException( const Thread* thread, const Throwable& error ) throw() = 0;
>         protected:                                                      // TO BE ADDED
>             ~UncaughtExceptionHandler() {}         // TO BE ADDED
>         };
> I compile with -Wall -Wextra -Werror and was getting compile errors because UncaughtExceptionHandler had a virtual method without a virtual destructor. It looks like a protected nonvirtual dtor is sufficient to eliminate that warning (with gcc 4.1.2)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.