Skip to content

Commit

Permalink
Throw error for invalid condition. Refs #8103
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiSavici committed Oct 9, 2013
1 parent 45b2b22 commit 8cd2655
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Code/Mantid/Framework/Algorithms/src/CopySample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The following information can be copied:
* Shape
* Oriented lattice
One can copy the orientation matrix only. To do this, select both CopyLattice and CopyOrientationOnly. If only CopyOrientationOnly is true, the algorithm will throw an error.
*WIKI*/
#include "MantidAlgorithms/CopySample.h"
Expand Down Expand Up @@ -164,6 +165,10 @@ namespace Algorithms
to.setOrientedLattice(new Geometry::OrientedLattice(from.getOrientedLattice()));
}
}
if ((!latticeFlag)&& orientationOnlyFlag)
{
throw std::runtime_error("CopyOrientationOnly flag is set to true, but CopyLattice is false");
}

}

Expand Down

0 comments on commit 8cd2655

Please sign in to comment.