| ILOG Rules for .NET User Guides > Rule Studio > Executing Rules > Setting an Exception Handler on the Engine Execution |
Setting an Exception Handler on the Engine Execution |
PREVIOUS NEXT |
To set an exception handler, see the UserRuntimeException Class.
The following exception is thrown at runtime when a user's methods or constructors throw exceptions.
try
{
engine.Execute();
}
catch (UserRuntimeException e) {
if (e.IsInActions()) {
Console.WriteLine("An exception was thrown in the action part
of a rule: " + e.Message);
}
else if (e.IsInConditions())
{
Console.WriteLine("An exception was thrown in the condition part
of a rule: " + e.Message);
}
}
Retrieving Data and Events From the Engine | Retrieving Data and Events From the Engine
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |