RDMI error handling

Previous Next

When a method is being invoked, RDMI supports the principle of exception handling for reporting errors. Subsequently, if the chosen middleware supports it, a message can be passed on with the exception to explain in detail what has gone wrong. Following the exception, the rules engine will display the returned message and will discontinue the transaction.

Here is a Visual Basic example of raising an exception.

Public Function SquareRoot(par1 As Integer) As Double
   If par1 < 0 Then
      Err.Raise vbObjectError + 1050, "USMath", "Value must be positive."
   Else
      SquareRoot = sqr(par1)
   End If
End Function

 

See also

Showing or suppressing component error messages

RDMI error messages