Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] advice/exception

Hi listeners,

I try to write an aspect which is responsible for checking parameters of 
several methodes. The param-check is done within an advice (before); if the 
check detects an invalid parameter an exception should be thrown to inform 
the caller of this bad parameter.

However, it is not possible to compile this aspect because the compiler 
finishes its work with an "Unhandled exception type ...".

Example:

before (KontoAsp  konto) :  execution(  public  * KontoAsp.ueberweisen( ..)) 
&& args(..,  konto)  {
	.......
		if (konto == null)
			throw new except.ProcessException(" ....");
			
	.......
	}


What I'm doing wrong?
Why does the compiler complains about an unhandled exception without knowing 
the caller. It's the duty of the caller to manage exceptions.

ThanX
franzR



Back to the top