Error handling

Describes how to handle messages and integrate them with your environment.

To better integrate messages with your environment, you may choose to handle them yourself. This is possible by extending the class IloOplErrorHandlerBaseI.

You can override the virtual methods to report messages:

  • IloBool handleError

  • IloBool handleWarning

  • IloBool handleFatal

These methods return a value to indicate whether the messages were handled correctly or not. If a message could not be handled, an exception is thrown.

It is not possible to extend the class IloOplErrorHandler in Java and .NET. However, you can redirect the error messages to any stream by using the appropriate factory methods:

Java


IloOplFactory.createOplErrorHandler(java.io.OutputStream outs)

.NET (C#)


OplFactory.CreateOplErrorHandler(TextWriter outs)