Skip to content
Snippets Groups Projects
Commit 4dbddc48 authored by Auke Klazema's avatar Auke Klazema
Browse files

SW-596: Fix a scope issue

parent 9e009b3c
No related branches found
No related tags found
No related merge requests found
...@@ -252,9 +252,10 @@ GCFEvent::TResult MACScheduler::initial_state(GCFEvent& event, GCFPortInterface& ...@@ -252,9 +252,10 @@ GCFEvent::TResult MACScheduler::initial_state(GCFEvent& event, GCFPortInterface&
// Try to connect to the SAS database. // Try to connect to the SAS database.
ParameterSet* pParamSet = globalParameterSet(); ParameterSet* pParamSet = globalParameterSet();
std::string username;
try try
{ {
string username = pParamSet->getString("OTDBusername"); username = pParamSet->getString("OTDBusername");
} }
catch(LOFAR::APSException& ex) catch(LOFAR::APSException& ex)
{ {
...@@ -263,9 +264,10 @@ GCFEvent::TResult MACScheduler::initial_state(GCFEvent& event, GCFPortInterface& ...@@ -263,9 +264,10 @@ GCFEvent::TResult MACScheduler::initial_state(GCFEvent& event, GCFPortInterface&
<< ex.what()); << ex.what());
throw(ex); throw(ex);
} }
std::string DBname;
try try
{ {
string DBname = pParamSet->getString("OTDBdatabasename"); DBname = pParamSet->getString("OTDBdatabasename");
} }
catch(LOFAR::APSException& ex) catch(LOFAR::APSException& ex)
{ {
...@@ -274,9 +276,10 @@ GCFEvent::TResult MACScheduler::initial_state(GCFEvent& event, GCFPortInterface& ...@@ -274,9 +276,10 @@ GCFEvent::TResult MACScheduler::initial_state(GCFEvent& event, GCFPortInterface&
<< ex.what()); << ex.what());
throw(ex); throw(ex);
} }
std::string password;
try try
{ {
string password = pParamSet->getString("OTDBpassword"); password = pParamSet->getString("OTDBpassword");
} }
catch(LOFAR::APSException& ex) catch(LOFAR::APSException& ex)
{ {
...@@ -285,9 +288,10 @@ GCFEvent::TResult MACScheduler::initial_state(GCFEvent& event, GCFPortInterface& ...@@ -285,9 +288,10 @@ GCFEvent::TResult MACScheduler::initial_state(GCFEvent& event, GCFPortInterface&
<< ex.what()); << ex.what());
throw(ex); throw(ex);
} }
std::string hostname
try try
{ {
string hostname = pParamSet->getString("OTDBhostname"); hostname = pParamSet->getString("OTDBhostname");
} }
catch(LOFAR::APSException& ex) catch(LOFAR::APSException& ex)
{ {
...@@ -296,9 +300,10 @@ GCFEvent::TResult MACScheduler::initial_state(GCFEvent& event, GCFPortInterface& ...@@ -296,9 +300,10 @@ GCFEvent::TResult MACScheduler::initial_state(GCFEvent& event, GCFPortInterface&
<< ex.what()); << ex.what());
throw(ex); throw(ex);
} }
std::string port;
try try
{ {
string port = pParamSet->getString("OTDBport"); port = pParamSet->getString("OTDBport");
} }
catch(LOFAR::APSException& ex) catch(LOFAR::APSException& ex)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment