Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » programmatically check if the generation Was successfull
programmatically check if the generation Was successfull [message #1798645] Wed, 21 November 2018 20:08 Go to next message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 210
Registered: February 2014
Senior Member
Hello,

I was wondering how can I programmatically know if the generation was successful or failed? I tried to embed the generate method with a try and catch but didn't work.

Thanks,
Parsa
Re: programmatically check if the generation Was successfull [message #1798655 is a reply to message #1798645] Thu, 22 November 2018 06:39 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

'success' is a beauty in the eye of the beholder.

If something fails dramatically you will probably get some kind of exception, or status return.

But if your M2T programming is defective your M2Tmay successfully generate output that disappoints you. You therefore need to validate the output possibly by checking for some expected textual snippets. Possibly by invoking some validation tool.

Regards

Ed Willink

Re: programmatically check if the generation Was successfull [message #1798672 is a reply to message #1798655] Thu, 22 November 2018 14:44 Go to previous messageGo to next message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 210
Registered: February 2014
Senior Member
Hi Ed,

Thanks for the reply :)

I'm looking for "dramatic" errors not validation ones. :)

That's the thing, I need to catch that exception, but don't know where! I have tried to catch it in the main method in the Generate java class but it didn't catch it. I can see that Acceleo shows a blue balloon at the bottom-right corner of the screen saying that it couldn't finish the task, but still the exception didn't throw anything when debugging.

don know, it doesn't make sense to me :D

Thanks,
Parsa

[Updated on: Thu, 22 November 2018 14:52]

Report message to a moderator

Re: programmatically check if the generation Was successfull [message #1798677 is a reply to message #1798672] Thu, 22 November 2018 15:35 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

well the debugger is your friend.

You could try breaking on any exception, but that is often depressing when numerous 'normal' exceptions have to be skipped.

You could break on the dialog pop-up.

Regards

Ed Willink
Re: programmatically check if the generation Was successfull [message #1798687 is a reply to message #1798677] Thu, 22 November 2018 17:42 Go to previous message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 210
Registered: February 2014
Senior Member
Yeah, Thanks Ed :)

Cheers,
Parsa
Previous Topic:input model
Next Topic:[acceleo] Find the root element
Goto Forum:
  


Current Time: Thu Mar 28 09:49:20 GMT 2024

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

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

Back to the top