Skip to content

Commit

Permalink
Re #6039. LoadSQW throws an exception if it cannot read a file.
Browse files Browse the repository at this point in the history
  • Loading branch information
mantid-roman committed Oct 31, 2012
1 parent 4aca604 commit 2930d35
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Code/Mantid/Framework/MDAlgorithms/src/LoadSQW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,11 @@ namespace Mantid
m_fileStream.read(&data_buffer[0],2*4);
this->m_nDims = *((uint32_t*)(&data_buffer[4]));

if ( m_nDims != 4 )
{
throw Kernel::Exception::NotImplementedError("Reading SQW files of dimension other than 4 is not implemented.");
}

parse_sqw_main_header();

// go through all component headers and read them (or calculate their length)
Expand Down

0 comments on commit 2930d35

Please sign in to comment.