Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » JET Error Handling
JET Error Handling [message #48851] Fri, 22 August 2008 07:14 Go to next message
justin Mising name is currently offline justin Mising nameFriend
Messages: 28
Registered: July 2009
Junior Member
Hi Paul,

I am looking for a way by which we could differentiate between template
errors and code errors through JET tags.
For example, I have a scenario where I create a DAO file through template.
During file creation,another file exists with name 'Dao'.
Currently,the error thrown by JET is:

Error: org.eclipse.core.internal.resources.ResourceException: A resource
exists with a different case:
'/credentials-integration-dao/src/test/java/com/accenture/ad sj/credentials/dao/PersonDaoHibernateTest.java'.

And then, a pop up window appears saying:
An internal error occurred during: "Launching web-templates
(FlowTest.xml)".
java.lang.NullPointerException

This error message seems to look like
org.eclipse.core.internal.resources.ResourceException - eclipse framework
exception and it is a naming/runtime exception.
Actually,is there a way to catch this exception and give different error
message.
Ideally,error/exception can be logged but flow should be allowed to
continue in template execution which does not happen here as a model
pop-up window appears stopping flow.
Is there a way to achieve this exception handling?
Kindly let us know soon.
Best regards,
Justin.
Re: JET Error Handling [message #49374 is a reply to message #48851] Thu, 11 September 2008 01:04 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Justin:

Sorry for the slow reply.

I'm a little confused by the situation. I understand the ResourceException.
But I don't know what's happening to cause the pop-up and the NPE. What
version of JET are you using?

In general, JET doesn't have a good exeception/error mechanism. The tag
handlers trap any exceptions, log them and then let execution proceed as
normally as possible. The file IO does actually happen until after all
templates have executed - perhaps the exception handling isn't right in
there.

Any snippets of could you can share would be helpful.

Paul


"justin" <justin_prabhu@yahoo.com> wrote in message
news:3b47a54426fd7aef484de803a5a266d8$1@www.eclipse.org...
> Hi Paul,
>
> I am looking for a way by which we could differentiate between template
> errors and code errors through JET tags.
> For example, I have a scenario where I create a DAO file through template.
> During file creation,another file exists with name 'Dao'. Currently,the
> error thrown by JET is:
>
> Error: org.eclipse.core.internal.resources.ResourceException: A resource
> exists with a different case:
> '/credentials-integration-dao/src/test/java/com/accenture/ad sj/credentials/dao/PersonDaoHibernateTest.java'.
>
> And then, a pop up window appears saying:
> An internal error occurred during: "Launching web-templates
> (FlowTest.xml)".
> java.lang.NullPointerException
>
> This error message seems to look like
> org.eclipse.core.internal.resources.ResourceException - eclipse framework
> exception and it is a naming/runtime exception. Actually,is there a way to
> catch this exception and give different error message.
> Ideally,error/exception can be logged but flow should be allowed to
> continue in template execution which does not happen here as a model
> pop-up window appears stopping flow.
> Is there a way to achieve this exception handling?
> Kindly let us know soon.
> Best regards,
> Justin.
>
Previous Topic:limit of String length
Next Topic:JET headless bulid
Goto Forum:
  


Current Time: Thu Nov 27 13:37:09 GMT 2014

Powered by FUDForum. Page generated in 0.01684 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software