In Acceleo, when I edit and save, say, generate.mtl
, Acceleo automatically generates Generate.java
class. From this java class I can call doGenerate
method from an external class to generate my model-based stuff.
However, if there is some exception during execution, this exception is handled by the Acceleo engine. I would like to tell Acceleo engine not to handle exceptions, and thus realize that an error occurred. How is it possible?
I've been thinking for a long time about this, without success. Last week, I successfully ran Acceleo in standalone mode, from a Java class instead of using the pluging.
It made me spend a lot of time with issues with libraries, problems with dependencies etc. but I finally got it (I mean, it's a hard work, be patient).
My surprise: When I ran Acceleo standalone it failed, but the templates were the same. I was having many errors, but the plugin was managing then and the plugin was printing an empty String as a result! Running Acceleo standalone, those errors raise an exception and my main class prints the stacktrace.
So, if you want to manage the errors by yourself, I recommend you to run it standalone but... good luck! :)
I hope this would help you :)