Skip to content

Commit

Permalink
Handle exception if file being loaded does not exist. Refs #8727.
Browse files Browse the repository at this point in the history
- As the "Load" button involves downloading and loading the file from the archives I have had to return early in the load method if a path to the file does not exist (e.g. it was not written to disk as an error has occurred).
  • Loading branch information
jawrainey committed Jan 22, 2014
1 parent 83e5faf commit 635e267
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Code/Mantid/MantidQt/MantidWidgets/src/CatalogSearch.cpp
Expand Up @@ -1113,6 +1113,7 @@ namespace MantidQt
// For all the files downloaded (or in archive) we want to load them.
for (unsigned i = 0; i < filePaths.size(); i++)
{
if (filePaths.at(i).empty()) return;
// Set the filename (path) of the algorithm to load from.
loadAlgorithm->setPropertyValue("Filename", filePaths.at(i));
// Sets the output workspace to be the name of the file.
Expand Down

0 comments on commit 635e267

Please sign in to comment.