Skip to main content



      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 15:08 Go to next message
Eclipse UserFriend
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 01:39 Go to previous messageGo to next message
Eclipse UserFriend
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 09:44 Go to previous messageGo to next message
Eclipse UserFriend
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 09:52] by Moderator

Re: programmatically check if the generation Was successfull [message #1798677 is a reply to message #1798672] Thu, 22 November 2018 10:35 Go to previous messageGo to next message
Eclipse UserFriend
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 12:42 Go to previous message
Eclipse UserFriend
Yeah, Thanks Ed :)

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


Current Time: Tue Apr 29 11:58:24 EDT 2025

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

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

Back to the top