Commit 3ad094ff authored by Owen Arnold's avatar Owen Arnold
Browse files

refs #7400. Change what is thrown.

parent df1189ef
......@@ -821,7 +821,7 @@ namespace DataObjects
auto det = getDetector();
if(det == NULL)
{
throw Mantid::Kernel::Exception::NotFoundError("Detector cannot be found.", "");
throw Mantid::Kernel::Exception::NullPointerException("Peak", "Detector");
}
return getDetector()->getPos();
}
......
......@@ -349,7 +349,7 @@ public:
Peak p(inst, detectorId, wavelength);
TSM_ASSERT_THROWS_NOTHING("Nothing wrong here, detector is valid", p.getDetectorPosition());
p.setQLabFrame(V3D(1,1,1), 1); // This sets the detector pointer to null and detector id to -1;
TSM_ASSERT_THROWS("Detector is not valid", p.getDetectorPosition(), Mantid::Kernel::Exception::NotFoundError&);
TSM_ASSERT_THROWS("Detector is not valid", p.getDetectorPosition(), Mantid::Kernel::Exception::NullPointerException&);
}
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment