Skip to content

Commit

Permalink
Be more verbose at errors in AP_amplitude
Browse files Browse the repository at this point in the history
  • Loading branch information
wvangeit committed Oct 5, 2015
1 parent 940f04e commit 55fedb8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions efel/cppcore/LibV1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,23 +460,25 @@ int LibV1::AP_amplitude(mapStr2intVec& IntFeatureData,
vector<double> v;
retVal = getDoubleVec(DoubleFeatureData, StringData, "V", v);
if (retVal <= 0) {
GErrorStr += "AP_amplitude: Can't find voltage vector V";
return -1;
}
retVal = getDoubleVec(DoubleFeatureData, StringData, "peak_voltage",
peakvoltage);
if (retVal <= 0) {
GErrorStr += "Error calculating peak_voltage for AP_amplitude";
GErrorStr += "AP_amplitude: Error calculating peak_voltage";
return -1;
}
retVal = getIntVec(IntFeatureData, StringData, "AP_begin_indices",
apbeginindices);
if (retVal <= 0) {
GErrorStr += "Error calculating AP_begin_indicies for AP_amplitude";
GErrorStr += "AP_amplitude: Error calculating AP_begin_indicies";
return -1;
}

if (peakvoltage.size() > apbeginindices.size()) {
GErrorStr += "More peakvoltage entries than AP begin entries";
GErrorStr +=
"AP_amplitude: More peak_voltage entries than AP_begin_indices entries";
return -1;
}

Expand All @@ -488,7 +490,6 @@ int LibV1::AP_amplitude(mapStr2intVec& IntFeatureData,
setDoubleVec(DoubleFeatureData, StringData, "AP_amplitude", apamplitude);
return apamplitude.size();
}
return -1;
}

// AHP_depth_abs
Expand Down

0 comments on commit 55fedb8

Please sign in to comment.