Is there a way to control transaction error messages that appear along with the intended error message?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a way to control transaction error messages that appear along with the intended error message?

Christian Carlow-OFBizzer
Anyone know how to prevent or reduce the number of times this error
message appears along with the intended error message:

"Error trying to begin transaction, could not process method: The
current transaction is marked for rollback, not beginning a new
transaction and aborting current operation; the rollbackOnly was caused
by: Error in simple-method"

The intended error is generated with this Minilang code:

         <!-- make sure the quantity is greater than or equal to 0 -->
         <if-compare field="parameters.quantity" operator="less"
value="0.0" type="BigDecimal">
             <string-to-list string="Negative issue quantities are not
allowed" list="error_list"/>
         </if-compare>
         <check-errors/>

For some reason transaction error is generated three times when the
error is detected.  I've see transaction error on other forms but don't
remember them showing up so many times.
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to control transaction error messages that appear along with the intended error message?

Adrian Crum-3
The framework wraps various things in transactions along the execution
path (screen rendering, service calls, scripts, etc) - and each instance
is wrapped in a try-catch block. When something goes wrong, control is
returned to the calling process via the nested catch blocks - with each
catch block trying to roll back the transaction. That is why you get
multiple error messages.

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 10/30/2013 6:35 AM, Christian Carlow wrote:

> Anyone know how to prevent or reduce the number of times this error
> message appears along with the intended error message:
>
> "Error trying to begin transaction, could not process method: The
> current transaction is marked for rollback, not beginning a new
> transaction and aborting current operation; the rollbackOnly was caused
> by: Error in simple-method"
>
> The intended error is generated with this Minilang code:
>
>          <!-- make sure the quantity is greater than or equal to 0 -->
>          <if-compare field="parameters.quantity" operator="less"
> value="0.0" type="BigDecimal">
>              <string-to-list string="Negative issue quantities are not
> allowed" list="error_list"/>
>          </if-compare>
>          <check-errors/>
>
> For some reason transaction error is generated three times when the
> error is detected.  I've see transaction error on other forms but don't
> remember them showing up so many times.