MotionController Axis MultiAxis IO IOPoint NetworkNode RsiError
Sample Apps Changelog

RapidCode API

RsiError

The RsiError object contains information about any RapidCode API object's error/exception. More...

Attributes

char functionName [RSI_ERROR_TEXT_SIZE]
 Function name of the raised the error.
 
bool isWarning
 Whether the error is or is not a warning.
 
int32 lineNumber
 Source code line number.
 
RSIErrorMessage number
 Error number.
 
char shortText [RSI_ERROR_TEXT_SIZE]
 Error short text.
 
char text [RSI_ERROR_TEXT_SIZE]
 Error message text.
 

Functions

virtual const char * what () const throw ()
 Returns a null terminated character sequence that may be used to identify the exception.
 

Description

The RsiError object contains information about any RapidCode API object's error/exception.

RSIErrors are thrown from RapidCode API calls and provide useful information for diagnostics and debugging. Objects and all data members are created on the stack and the RsiError object itselt is thrown. The preferred catch is by const reference, but by value will work, too. It is safe to assume that every RapidCode API call can throw an RsiError.

Exception throwing can be disabled for an object instance using ::ThrowExceptions(false) and enabled using ::ThrowExceptions(true). It can be disabled across then entire API by calling this function on the MotionController instance if set to false, a log of RsiErrors can be accessed using ::ErrorLogGet()

try
{
// something that throws an RsiError()
}
catch (const RSI::RapidCode::RsiError &rsi_error)
{
rsi_error.number;
rsi_error.lineNumber;
rsi_error.isWarning;
rsi_error.text;
rsi_error.functionName;
rsi_error.shortText;
rsi_error.what();
}
Examples
AbsoluteMotion.cpp, AxisSettling.cpp, AxisStatus.cpp, Camming.cpp, Camming.cs, ConfigAmpFault.cpp, ControllerInterrupts.cpp, CustomEtherCATHome.cpp, CustomHome.cpp, DedicatedIO.cpp, ErrorLog.cpp, ErrorLog.cs, FeedRate.cpp, FinalVelocity.cpp, Gearing.cpp, HardwareLimits.cpp, HelperFunctions.h, Home.cpp, HomeToNegativeLimit.cpp, HomingWithAKDdrive.cpp, IOwithAKD.cpp, Memory.cpp, MotionHoldReleasedByDigitalInput.cpp, MotionHoldReleasedByPosition.cpp, MotionHoldReleasedBySoftwareAddress.cpp, MultiaxisMotion.cpp, PathMotion.cpp, PhantomAxis.cpp, PointToPointMultiaxisMotion.cpp, PTmotion.cpp, PTmotionWhileStopping.cpp, PVTmotion.cpp, PVTmotionMultiAxis.cpp, Recorder.cpp, Recorder.cs, RelativeMotion.cpp, SCurveMotion.cpp, SettleCriteria.cpp, SetUserUnits.cpp, SingleAxisSyncOutputs.cpp, StopRate.cpp, StreamingMotionBufferManagement.cpp, SyncInterrupt.cpp, SyncOutputWithMotion.cpp, Template.cpp, UpdateBufferPoints.cpp, UserLimitDigitalInputAction.cpp, UserLimitDigitalInputOneCondition.cpp, UserLimitDigitalInputTwoCondition.cpp, UserLimitGainChangeBasedOnPosition.cpp, UserLimitPositionOneCondition.cpp, UserLimitStateAction.cpp, and VelocitySetByAnalogInputValue.cpp.