Skip to content

Commit

Permalink
Throw an exception if soapEndPoint is empty. Refs #8719.
Browse files Browse the repository at this point in the history
  • Loading branch information
jawrainey committed Jan 23, 2014
1 parent 6187488 commit 8b241f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Code/Mantid/Framework/ICat/src/ICat4/ICat4Catalog.cpp
Expand Up @@ -898,6 +898,10 @@ namespace Mantid
*/
void ICat4Catalog::setICATProxySettings(ICat4::ICATPortBindingProxy& icat)
{
// The soapEndPoint is only set when the user logs into the catalog.
// Instead, Inform the user that they need to log into the catalog as no soapEndPoint is set.
if (ICat::Session::Instance().getSoapEndPoint().empty())
throw std::runtime_error("Session ID cannot be null or empty. Please log into the catalog.");
// Set the soap-endpoint of the catalog we want to use.
icat.soap_endpoint = ICat::Session::Instance().getSoapEndPoint().c_str();
// Sets SSL authentication scheme
Expand Down

0 comments on commit 8b241f1

Please sign in to comment.