Skip to content
Snippets Groups Projects
Unverified Commit 467291b0 authored by Martyn Gigg's avatar Martyn Gigg Committed by GitHub
Browse files

Merge pull request #22986 from mantidproject/22933_fix_validateInputs_exception_in_RSIQ

Fix unhandled exception in validateInputs in RSIQ
parents 34bfb137 472d1d34
No related branches found
No related tags found
No related merge requests found
......@@ -269,8 +269,18 @@ std::map<std::string, std::string> ReflectometrySumInQ::validateInputs() {
std::map<std::string, std::string> issues;
API::MatrixWorkspace_sptr inWS;
Indexing::SpectrumIndexSet indices;
std::tie(inWS, indices) =
getWorkspaceAndIndices<API::MatrixWorkspace>(Prop::INPUT_WS);
// validateInputs is called on the individual workspaces when the algorithm
// is executed, it but may get called on a group from AlgorithmDialog. This
// isn't handled in getWorkspaceAndIndices. We should fix this properly but
// for now skip validation for groups to avoid an exception. See #22933
try {
std::tie(inWS, indices) =
getWorkspaceAndIndices<API::MatrixWorkspace>(Prop::INPUT_WS);
} catch (std::runtime_error &) {
return issues;
}
const auto &spectrumInfo = inWS->spectrumInfo();
const int beamCentre = getProperty(Prop::BEAM_CENTRE);
bool beamCentreFound{false};
......
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