API Guides > ConceptRT 3.x
ErrorsManagement/main.cpp

Error Management example to diagnose the source of an error.

#include "ConceptRTOs.h"
using namespace ConceptRT;
// function prototype that can be used for tracing thrown RT exception
void OnException(RTException & e)
{
// put a break point here to find wich line throws an exception in your code.
if (e.GetErrorId() == RT_ERROR_OUT_OF_BOUND_INDEX)
{
int t = 0;
}
}
{
// Code to branch a function on the event of thrown RT exception
DelegateFunction<RTException &> delegateOnException(OnException);
data[10]; // line that is wrong.
}
{
// without licence
}