Skip to content
Snippets Groups Projects
Commit adc9672c authored by Sonia Minolli's avatar Sonia Minolli
Browse files

Change warning error string management => do like NI examples to avoid bad...

Change warning error string management => do like NI examples to avoid bad memory allocation (TANGODEVIC-787)
parent 09d0b871
Branches
Tags
No related merge requests found
......@@ -295,11 +295,9 @@ throw (ni660Xsl::DAQException)
// ============================================================================
std::string CounterBasedOperation::get_string_error(void)
{
long size = DAQmxGetExtendedErrorInfo(NULL,0);
char* string_err = new char[size];
DAQmxGetExtendedErrorInfo(string_err, size);
std::string s = string_err;
delete [] string_err;
char errBuff[2048] = {'\0'};
DAQmxGetExtendedErrorInfo(errBuff,2048);
std::string s = errBuff;
return s;
}
// ============================================================================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment