CEx and DEx inherits for BEx and BEx inherits from AEx. So exception hanlding should start from bottom to up. Base exception last.
try
{
// statements causing exception
}
catch( CEx cEx )
{
// error handling for CEx
}
catch( DEx dEx )
{
// error handling for DEx
}
catch( BEx bEx )
{
// error handling for BEx
}
catch( AEx aEx )
{
// error handling for AEx
}
finally
{
// statements to be executed
}