Skip to content

Commit

Permalink
Re #6543. Remove unnecessary guard that fails on the Mac.
Browse files Browse the repository at this point in the history
And the test that checks it. If the file doesn't exist, it
won't be possible to execute the algorithm as the validator on
the Filename property will prevent it.
  • Loading branch information
RussellTaylor committed Feb 27, 2013
1 parent fe42bb5 commit c366a6c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions Code/Mantid/Framework/DataHandling/src/LoadDetectorInfo.cpp
Expand Up @@ -805,10 +805,6 @@ void LoadDetectorInfo::sometimesLogSuccess(const detectorInfo &params, bool &nee
/**The methor reads selected part of detector.nxs file and apply correspondent changes to the detectors */
void LoadDetectorInfo::readNXS(const std::string& fName)
{
Poco::File nxsFile(fName);
if(!nxsFile.exists() || !nxsFile.isFile())
throw std::invalid_argument(" file "+fName+" does not exist");

auto hFile = new ::NeXus::File(fName,NXACC_READ);
if(!hFile)
throw std::runtime_error(" Can not open file "+fName+" as nexus file");
Expand Down
Expand Up @@ -275,8 +275,6 @@ class LoadDetectorInfoTest : public CxxTest::TestSuite
{
LoadDetectorIndoTestHelper loader;

TS_ASSERT_THROWS(loader.readNXS("NonExistingFile"),std::invalid_argument);

std::string nexusWithoutDet = FileFinder::Instance().getFullPath("argus0026287.nxs");
if(nexusWithoutDet.empty())return;
TSM_ASSERT_THROWS("this nexus does not have detector information ",loader.readNXS(nexusWithoutDet),std::invalid_argument);
Expand Down

0 comments on commit c366a6c

Please sign in to comment.