Skip to content

Commit

Permalink
Wrap call to mask bins in try-catch
Browse files Browse the repository at this point in the history
  • Loading branch information
darominski committed Jun 15, 2022
1 parent 7993684 commit e758270
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions qt/widgets/instrumentview/src/InstrumentActor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,11 @@ void InstrumentActor::applyMaskWorkspace() {
}

// Mask bins
m_maskBinsData.mask(m_workspace);

try {
m_maskBinsData.mask(m_workspace);
} catch (std::logic_error &) {
m_messageHandler.giveUserWarning("An error occurred when applying the mask to bins.", "Mantid - Warning");
}
clearMasks();
}

Expand Down

0 comments on commit e758270

Please sign in to comment.