Home » Language IDEs » AspectJ » Exception softening
Exception softening [message #69979] |
Thu, 29 March 2007 22:27 |
Eclipse User |
|
|
|
Originally posted by: amster1981.gmail.com
Hello,
I'm working on project(my diploma thesis) in which i would like to use as
many features as AspectJ and AJDT offers. I'm still learning, but so far,
i really like AspectJ and AJDT very much, it's really great for managing
cross-cutting concerns and i feel that i manage to implement more cleaner
and readable code and with better modularity.
The project is 3-tier app, which uses Java GUI, J2EE patterns, EJB, DAO
and such and postgreSQL DB.
I would like to ask about exception softening, because i'm using it for
example for softening SQLException, so that i'm handling it in aspect in
unified manner and it won't propagate further by throws clause or that i
don't have to write try and catch block in every DAO Operation.
When i declare softening like:
pointcut JavaSQLMethods() : call(* java.sql.*.*(..));
declare soft : SQLException : JavaSQLMethods();
When i run the app, then it does work as it should, i don't have to write
try, catch blocks or throws SQLException in every DAO Operation, but it
keeps showing errors in the editor part of IDE.....is it just my problem
or is it known issue?
Andrej J.
|
|
|
Re: Exception softening [message #69998 is a reply to message #69979] |
Fri, 30 March 2007 07:30 |
Matt Chapman Messages: 429 Registered: July 2009 |
Senior Member |
|
|
Hi Andrej,
Are the errors only appearing in the editor (not in the problems view as
well)? If so, you need to use the AspectJ editor instead of the Java
editor. See here for more info:
http://www.eclipse.org/ajdt/faq.php#q:errors
Regards,
Matt.
Andrej wrote:
> Hello,
>
> I'm working on project(my diploma thesis) in which i would like to use
> as many features as AspectJ and AJDT offers. I'm still learning, but so
> far, i really like AspectJ and AJDT very much, it's really great for
> managing cross-cutting concerns and i feel that i manage to implement
> more cleaner and readable code and with better modularity.
>
> The project is 3-tier app, which uses Java GUI, J2EE patterns, EJB, DAO
> and such and postgreSQL DB.
>
> I would like to ask about exception softening, because i'm using it for
> example for softening SQLException, so that i'm handling it in aspect in
> unified manner and it won't propagate further by throws clause or that i
> don't have to write try and catch block in every DAO Operation.
>
> When i declare softening like:
> pointcut JavaSQLMethods() : call(* java.sql.*.*(..));
>
> declare soft : SQLException : JavaSQLMethods();
>
> When i run the app, then it does work as it should, i don't have to
> write try, catch blocks or throws SQLException in every DAO Operation,
> but it keeps showing errors in the editor part of IDE.....is it just my
> problem or is it known issue?
>
> Andrej J.
>
>
|
|
|
Re: Exception softening [message #70017 is a reply to message #69998] |
Fri, 30 March 2007 11:12 |
Eclipse User |
|
|
|
Originally posted by: amster1981.gmail.com
Hi Matt,
Yes, that was exactly the case, the errors were appearing only in the
editor, not in problems view, so i took a look into FAQ, and i couldn't
find Window > Preferences > Workbench > File Associations in Eclipse 3.2.2
which i'm using. But i think it's in Window > Preferences > General >
Editors > File Associations and there i set AspectJ editor as default for
*.java. That helped and it works nicely.
Thank you.
Kind Regards,
Andrej J.
|
|
|
Re: Exception softening [message #596090 is a reply to message #69979] |
Fri, 30 March 2007 07:30 |
Matt Chapman Messages: 429 Registered: July 2009 |
Senior Member |
|
|
Hi Andrej,
Are the errors only appearing in the editor (not in the problems view as
well)? If so, you need to use the AspectJ editor instead of the Java
editor. See here for more info:
http://www.eclipse.org/ajdt/faq.php#q:errors
Regards,
Matt.
Andrej wrote:
> Hello,
>
> I'm working on project(my diploma thesis) in which i would like to use
> as many features as AspectJ and AJDT offers. I'm still learning, but so
> far, i really like AspectJ and AJDT very much, it's really great for
> managing cross-cutting concerns and i feel that i manage to implement
> more cleaner and readable code and with better modularity.
>
> The project is 3-tier app, which uses Java GUI, J2EE patterns, EJB, DAO
> and such and postgreSQL DB.
>
> I would like to ask about exception softening, because i'm using it for
> example for softening SQLException, so that i'm handling it in aspect in
> unified manner and it won't propagate further by throws clause or that i
> don't have to write try and catch block in every DAO Operation.
>
> When i declare softening like:
> pointcut JavaSQLMethods() : call(* java.sql.*.*(..));
>
> declare soft : SQLException : JavaSQLMethods();
>
> When i run the app, then it does work as it should, i don't have to
> write try, catch blocks or throws SQLException in every DAO Operation,
> but it keeps showing errors in the editor part of IDE.....is it just my
> problem or is it known issue?
>
> Andrej J.
>
>
|
|
| |
Goto Forum:
Current Time: Wed Sep 25 16:03:36 GMT 2024
Powered by FUDForum. Page generated in 0.04134 seconds
|