[aspectc-user] Throw exception
Dima S
spiridenok at tut.by
Mon Feb 18 11:00:55 CET 2008
Hello all,
I want to have a pointcut for throwing C++ exception.
I have the following code:
class MyExc
{
public:
MyExc();
};
MyExc::MyExc()
{
}
class bobo
{
public:
int bobo::bla( int d )
{
if( d == 0 )
{
throw MyExc();
}
return d * d;
}
I define the following pointcut:
pointcut exception() = call( "%throw%" );
and corresponding advice:
advice exception(): before ()
{
printf( "\tException is thrown here!");
}
However it does not work.
Any idea what i should do to get correct advice/pointcut?
Thanks in advance!
----------
Доставка на дом и в офис пиццы, суши, шашлыка, напитков круглосуточно.
Закажи сейчас! http://www.pizza.by
(017) 266-35-07, (029) 690-93-93, 555-93-93
More information about the aspectc-user
mailing list