<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Is there any API to throw exception programmatically in ivy</title><link>https://answers.axonivy.com/questions/1928/is-there-any-api-to-throw-exception-programmatically-in-ivy</link><description>&lt;p&gt;Hi all&lt;/p&gt;
&lt;p&gt;Some months ago i heard about the new exception handling mechanism which has been introduces by ivy team. Somehow ivy now can care about exception in BPM, we just need to use some special  elements to throw and catch error code. And now i'm trying to use it in our project. 
Well, now  may question is: beside of those special elements, is there any ivy API to throw exception with defined error code in java?
Thanks in advance&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1928/is-there-any-api-to-throw-exception-programmatically-in-ivy" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 03 Aug 2016 11:02:27 -0400</lastBuildDate><item><title>Answer by Christian Strebel</title><link>https://answers.axonivy.com/questions/1928/is-there-any-api-to-throw-exception-programmatically-in-ivy/1933</link><description>&lt;p&gt;See &lt;a href="http://developer.axonivy.com/doc/latest/PublicAPI/ch/ivyteam/ivy/bpm/error/BpmError.html"&gt;BpmError Public API&lt;/a&gt; which you can use in Java or IvyScript.&lt;/p&gt;
&lt;p&gt;You could build and throw an BpmError form IvyScript or Java like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;BpmError.create("finance:nomoney").throwError();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To find out more about this look at the &lt;a href="http://developer.axonivy.com/doc/latest/DesignerGuideHtml/ivy.concepts.html#ivy-concepts-error"&gt;error handling concept&lt;/a&gt; in the Designer Guide.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christian Strebel</dc:creator><pubDate>Wed, 03 Aug 2016 11:02:27 -0400</pubDate><guid>https://answers.axonivy.com/questions/1928/is-there-any-api-to-throw-exception-programmatically-in-ivy/1933</guid></item></channel></rss>