Getting Started Guide

Contents

Handling Errors

Intel DAAL
provides classes and methods to handle exceptions or errors that can occur during library operation.
The methods of the library return the following computation set status:
  • Success - no errors detected
  • Warning - recoverable errors detected
  • Failure - unrecoverable errors detected
In
Intel DAAL
C++ interfaces, the
base class for error handling is
Status
. If the execution of the library methods provided by the Algorithm or Data Management classes is unsuccessful, the
Status
object returned by the respective routines contains the list of errors and/or warnings extended with additional details about the error conditions. The class includes the list of the following methods for error processing:
  • ok()
    Checks whether the
    Status
    object contains any unrecoverable errors.
  • add()
    Adds information about the error, such as the error identifier or the pointer to the error.
  • getDescription()
    Returns the detailed description of the errors contained in the object.
  • clear()
    Removes information about the errors from the object.
The error class
in
Intel DAAL
C++ interfaces
is
Error
. This class contains an error message and details of the issue. For example, an
Error
object can store the number of the row in the
NumericTable
that caused the issue or a message that an SQL database generated to describe the reasons of an unsuccessful query. A single
Error
object can store the error description and an arbitrary number of details of various types: integer or double values or strings.
The class includes the list of the following methods for error processing:
  • id()
    Returns the identifier of the error.
  • setId()
    Sets the identifier of the error.
  • description()
    Returns the detailed description of the error.
  • add[Int|Double|String]Detail()
    Adds data type-based details to the error.
  • create()
    Creates an instance of the
    Error
    class with the given set of arguments.
By default, the
compute()
method of the library algorithms throws run-time exception when error is detected. To prevent throwing any exceptions, call the
computeNoThrow()
method.
Service methods of the algorithms, such as
setResult()
and
setPartialResult()
, do not throw exceptions and return the status of the respective operation.
The methods of the Data Management classes do not throw exceptions and return the status of the respective operation.
Intel DAAL
Java* interfaces handle errors by throwing Java exceptions.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804