Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTo] Exceptions and warnings
[QVTo] Exceptions and warnings [message #510728] Thu, 28 January 2010 13:24 Go to next message
PBarendrecht is currently offline PBarendrechtFriend
Messages: 36
Registered: November 2009
Location: Eindhoven, Netherlands
Member
Hi all,

To prevent incomplete transformations, I'm using xmap and assert at several places in my transformation. However, they don't work as I expected them to:

- According to the MOF QVT specs, xmap should return an exception if the when-clause doesn't hold. I don't see any exception, even though my "example"-when is pretty rigid: when {1 = 2} { ... } --should result in an exception.
Do I have to configure something to be able to see these exceptions?

- I couldn't find this in the specs, but does xmap also throw an exception if there is no right disjunct mapping? The specs state that in this case the value "null" is returned, this also happens when a when-clause doesn't hold.
If not, is there some kind of "default" for the disjuncts option?

- When using assert, one can choose "warning", "error" or "fatal". The latter one terminates the entire transformation while the first two just display a message and continue the transformation. It would be nice if the "error" assertion would terminate the current mapping. At the moment I don't see a difference between the "warning" and "error".

---
As promised I'm working on a QVTo tutorial, but my own QVTo project has of course a higher priority. I think it will take a few weeks until my basic tutorial is finished, when people find it useful I'll expand the tutorial.

[Updated on: Thu, 28 January 2010 13:25]

Report message to a moderator

Re: [QVTo] Exceptions and warnings [message #510749 is a reply to message #510728] Thu, 28 January 2010 14:04 Go to previous message
Eclipse UserFriend
Originally posted by: dvorak.radek.gmail.com

Hi,

> - According to the MOF QVT specs, xmap should return an exception if the
> when-clause doesn't hold. I don't see any exception, even though my when
> is pretty rigid: when {1 = 2} { ... } --should result in an exception.
> Do I have to configure something to be able to see these exceptions? - I
> couldn't find this in the specs, but does xmap also throw an exception
> if there is no right disjunct mapping? The specs state that in this case
> the value "null" is returned, this also happens when a when-clause
> doesn't hold. If not, is there some kind of "default" for the disjuncts
> option?

The spec does not explicitly mentions this, however I assume it would be
logical
that xmap on disjuncts works the same as on normal mappings.

Could you please raise bugzilla on that?
https://bugs.eclipse.org/bugs/enter_bug.cgi?bug_status=NEW&a mp;component=QVT_OML-Engine&form_name=enter_bug&prod uct=M2M&version=2.0

>
> - When using assert, one can choose "warning", "error" or "fatal". The
> latter one terminates the entire transformation while the first two just
> display a message and continue the transformation. It would be nice if
> the "error" assertion would terminate the current mapping. At the moment
> I don't see a difference between the "warning" and "error".
>

Only assert fatal terminates execution, the other variants produces just a
log
record. I agree it is not very useful, perhaps a debugger might make use
of it
and suspend there. I would just use fatal everywhere.
The worse thing is that it can't be disabled, so it always has to execute.
Not sure why the OMG spec tried to reinvent the wheels here, if Java
assertion
semantics works fine.


> ---
> As promised I'm working on a QVTo tutorial, but my own QVTo project has
> of course a higher priority. I think it will take a few weeks until my
> basic tutorial is finished, when people find it useful I'll expand the
> tutorial.

Thanks!

Regards,
/Radek
Previous Topic:Is VIATRA2 still being developed?
Next Topic:[ATL] Unique lazy rules with multiple arguments
Goto Forum:
  


Current Time: Fri Apr 26 05:06:21 GMT 2024

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

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

Back to the top