Matrix Science header

Error Handling
[Shared classes for handling errors and warnings in Mascot Parser modules]

Error handling

Mascot Parser 2.0 introduced configuration files and authentication functionality along with a more generic approach to error handling. The following classes are now derived from ms_errors, and provide the same interface to error handling.

The general recipe is:

  1. Check validity with isValid().
  2. If not valid, get the last error description with getLastErrorString().
  3. Reset error status with clearAllErrors().

If this functionality is not enough, you can call getErrorHandler() to obtain a pointer to the error object (ms_errs) that holds a list of all errors for the object in question.

ms_mascotresfile supports an identical error handling interface. The only difference to ms_errors is the list of supported error codes.

For the complete and up to date list of possible error codes, see ms_errs::err.

For example code, see Examples for error handling in Mascot Parser modules.

Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Sat Apr 14 2018 01:45:13