Skip to content
Snippets Groups Projects
Commit 20a49aac authored by Verena Reimund's avatar Verena Reimund
Browse files

Improve input validation

Refs #22197
parent 138414ef
No related merge requests found
......@@ -165,10 +165,14 @@ std::map<std::string, std::string> Stitch1D::validateInputs(void) {
std::map<std::string, std::string> issues;
MatrixWorkspace_const_sptr lhs = getProperty("LHSWorkspace");
MatrixWorkspace_const_sptr rhs = getProperty("RHSWorkspace");
if (!lhs)
issues["LHSWorkspace"] = "Cannot retrieve workspace";
if (!rhs)
issues["RHSWorkspace"] = "Cannot retrieve workspace";
if (lhs->isHistogramData() && !rhs->isHistogramData())
issues["RHSWorkspace"] = "Must be a histogram like LHSWorkspace.";
issues["RHSWorkspace"] = rhs->getName() + " must be a histogram.";
if (!lhs->isHistogramData() && rhs->isHistogramData())
issues["RHSWorkspace"] = "Must be point data like LHSWorkspace.";
issues["RHSWorkspace"] = lhs->getName() + " must be point data.";
return issues;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment