ContainsError
Compares the specified value against the standard error replies { timeout ( TOUT ), error ( ERR ), system reset ( SYR ), reset ( RST ) }.
Syntax
bool ContainsError( value );
Parameters
long value
The value to compare against standard error values.
Returns
bool - Returns 'true' if the parameter matches one of the standard error replies; 'false' otherwise.
Required Headers
CController.h
Namespace
arc
Throws
None
Remarks
None
Example
        // Demonstrates how to check a command
        // reply for errors.

        #include <iostream.h>
        #include "CController.h"
        using namespace std;
        using namespace arc;

        CController cController;

        // .... open driver, initialize, etc ....

        try {
            // Set the next exposure time to 3 seconds
            long lRetVal = cController.Command( TIM_ID, SET, 3000 );

            if ( cController.ContainsError( lRetVal ) )
                throw std::runtime_error( "Set exposure time failed!" );

            // .... OR could have also done this ....

            lRetVal = cController.Command( TIM_ID, SET, 3000 );

            if ( lRetVal != DON )
                throw std::runtime_error( "Set exposure time failed!" );
         }
        catch ( std::exception &e )
        {
            cerr << "Exception Occurred: " << e.what() << endl;
        }

© Astronomical Research Cameras, Inc.