Commit b5328c0f authored by Marco Bartolini's avatar Marco Bartolini
Browse files

better exception management

parent 86fd248c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -180,13 +180,13 @@ public:
     * Turn the elevation tracking of minor servos on
     * @throw ManagementErrors::ConfigurationErrorEx
     */
    void turnTrackingOn() throw (MinorServoErrors::TrackingErrorEx);
    void turnTrackingOn() throw (MinorServoErrors::MinorServoErrorsEx);

    /**
     * Turn the elevation tracking of minor servos off. After that, the system is not ready
     * @throw ManagementErrors::ConfigurationErrorEx
     */
    void turnTrackingOff() throw (MinorServoErrors::TrackingErrorEx);
    void turnTrackingOff() throw (MinorServoErrors::MinorServoErrorsEx);

    /** Return the actual configuration */
    char * getActualSetup();
@@ -297,7 +297,7 @@ public:
             ACS::Time & starting_time, 
             const MinorServo::MinorServoScan& scan_parameters,
             const Antenna::TRunTimeParameters& antenna_parameters
     ) throw (MinorServoErrors::ScanErrorEx);
     ) throw (MinorServoErrors::MinorServoErrorsEx);
    
    /** Return the central position of the axis involved in the scan */
    CORBA::Double getCentralScanPosition()
+10 −0
Original line number Diff line number Diff line
@@ -11,6 +11,16 @@
        throw exImpl; \
}

#define THROW_MINORSERVO_EX(NAME, MESSAGE, THROUGH_GET) \
{ \
    string msg(MESSAGE); \
    ACS_SHORT_LOG((LM_ERROR, msg.c_str())); \
    MinorServoErrors::NAME##Impl exImpl(__FILE__, __LINE__, msg.c_str()); \
    if(THROUGH_GET) \
        throw exImpl.getMinorServoErrorsEx(); \
    else \
        throw exImpl; \
}

#define GET_PROPERTY_REFERENCE(IMPLNAME, TYPE, PROPERTY, PROPERTYNAME) \
    TYPE##_ptr IMPLNAME::PROPERTYNAME() \