Developer Guide

  • 10/27/2020
  • Public Content
Contents

Error Handling and Recovery

One of the main aspects of trusted application validation is the negative validation of both the functional side and management side:
  • Informative error reports
     - trusted application code should handle all possible errors that might occur due to invalid usage of the trusted application. In addition it should return some usable errors to the host-side for further error handling. The correct way to do so is via the relevant methods for error passing . Using different errors and values for various cases and states is recommended mostly since the debugging capabilities in production setups are very limited!
  • Handling exceptions
     – Besides the exceptions, which are defined in the relevant APIs, additional run-time exceptions might occur. These should be taken into account during reviews and validation (e.g. nullPointerException or ArrayOutOfBoundsException). In addition, verifying that call-back functions handle all exceptions is also recommended, since an exception there will not be caught by the trusted application if it is thrown from the scope of the call-back.
Validation needs to cover the difference between what is returned by the trusted application versus error messages from the VM.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.