Compiler Warning (level 1) C4286

'type1' : is caught by base class ('type2') on line number

The specified exception type is handled by a previous handler. The type for the second catch is derived from the type of the first. Exceptions for a base class will catch exceptions for a derived class.

The following is an example of this warning:

#include <eh.h>
class C {};
class D : public  C {};
void main()
{
    try
    {
        throw "ooops!";
    }
    catch( C ) {}
    catch( D ) {}  // warning, D is derived from C
}