Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Runtime exception handling?
Runtime exception handling? [message #886653] Fri, 15 June 2012 07:18 Go to next message
Kosala Yapa is currently offline Kosala Yapa
Messages: 159
Registered: September 2010
Senior Member
Hi all,

Is it possible to handle runtime exceptions in an atl program?

Thanks in advance !
K
Re: Runtime exception handling? [message #1006972 is a reply to message #886653] Sun, 03 February 2013 06:42 Go to previous messageGo to next message
Alessandro Ranieri is currently offline Alessandro Ranieri
Messages: 16
Registered: November 2012
Junior Member
I'm also interested in this topic. Is there any way in which to do exception handling? For example, is there an instruction to terminate the execution that one can use for example in a if construct in the do section? Something like:

do {
if ( something unexpected ){
terminateWithError
}
}

I think this approach, altough some validation should be made earlier on the input model, can be useful in this phase when the validation is supported from few tools. For example Papyrus doesn't support that.

Thanks for the reply,

Alessandro R.
Re: Runtime exception handling? [message #1006992 is a reply to message #1006972] Sun, 03 February 2013 11:33 Go to previous message
Dennis Wagelaar is currently offline Dennis Wagelaar
Messages: 155
Registered: September 2012
Senior Member

Op 03-02-13 12:42, Alessandro Ranieri schreef:
> I'm also interested in this topic. Is there any way in which to do exception
> handling? For example, is there an instruction to terminate the execution that
> one can use for example in a if construct in the do section? Something like:
>
> do {
> if ( something unexpected ){
> terminateWithError
> }
> }
>
> I think this approach, altough some validation should be made earlier on the
> input model, can be useful in this phase when the validation is supported from
> few tools. For example Papyrus doesn't support that.
>
> Thanks for the reply,
>
> Alessandro R.

No, ATL cannot throw or catch exceptions. It's just not compatible with the
unordered rules philosophy. You'll have to do validation in another way, e.g.
using an ATL query, EMF Validation, or EMF-IncQuery.

Regards,
Dennis


Cheers,
Dennis
Previous Topic:In-place refining mode is now available for EMFTVM
Next Topic:output structured model by called rules
Goto Forum:
  


Current Time: Fri Aug 22 21:34:25 EDT 2014

Powered by FUDForum. Page generated in 0.12540 seconds