Skip to content
Snippets Groups Projects
Commit de5faae6 authored by Ger van Diepen's avatar Ger van Diepen
Browse files

bug 1655:

Use backtrace possibility
parent 871a2968
Branches
Tags
No related merge requests found
......@@ -30,6 +30,9 @@ using namespace std;
using namespace LOFAR;
using namespace LOFAR::CEP;
// Define handler that tries to print a backtrace.
Exception::TerminateHandler t(Exception::terminate);
int main (int argc, const char* argv[])
{
try {
......@@ -46,8 +49,8 @@ int main (int argc, const char* argv[])
// Combine them.
VdsMaker::combine (argv[1], vdsNames);
} catch (exception& x) {
cout << "Unexpected expection: " << x.what() << endl;
} catch (LOFAR::Exception& err) {
std::cerr << "LOFAR Exception detected: " << err << std::endl;
return 1;
}
return 0;
......
......@@ -25,14 +25,18 @@
#include<stdexcept>
#include <iostream>
using namespace LOFAR;
using namespace std;
// Define handler that tries to print a backtrace.
Exception::TerminateHandler t(Exception::terminate);
int main(int argc, const char* argv[])
{
try {
if (argc < 3 || argv[1][0] == '\0' || argv[2][0] == '\0') {
cout << "Run as: makevds clusterdesc ms [msvds] [hostname] [writetimes]" << endl;
cout << "Run as: makevds clusterdesc ms [msvds] [hostname] [writetimes]"
<< endl;
cout << " default vds name is <ms>.vds" << endl;
cout << " default host name is gethostname()" << endl;
cout << " default writetimes is false (0)" << endl;
......@@ -58,8 +62,8 @@ int main(int argc, const char* argv[])
writeTimes = (argv[5][0]=='t' || argv[5][0]=='T' || argv[5][0]=='1');
}
LOFAR::VdsMaker::create (argv[2], msvds, argv[1], hostName, writeTimes);
} catch (exception& x) {
cout << "Unexpected expection: " << x.what() << endl;
} catch (LOFAR::Exception& err) {
std::cerr << "LOFAR Exception detected: " << err << std::endl;
return 1;
}
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment