File: main.cpp

package info (click to toggle)
wsclean 3.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,296 kB
  • sloc: cpp: 129,246; python: 22,066; sh: 360; ansic: 230; makefile: 185
file content (33 lines) | stat: -rw-r--r-- 864 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "commandline.h"
#include "wsclean.h"

#include <aocommon/checkblas.h>
#include <aocommon/logger.h>

#include <exception>
#include <iostream>

using aocommon::Logger;

using wsclean::CommandLine;
using wsclean::WSClean;

int main(int argc, char* argv[]) {
  try {
    check_openblas_multithreading();
    WSClean wsclean;
    if (CommandLine::Parse(wsclean, argc, const_cast<const char**>(argv),
                           false))
      CommandLine::Run(wsclean);
    return 0;
  } catch (std::exception& e) {
    Logger::Error << "+ + + + + + + + + + + + + + + + + + +\n"
                  << "+ An exception occured:\n";
    std::istringstream iss(e.what());
    for (std::string line; std::getline(iss, line);) {
      Logger::Error << "+ >>> " << line << "\n";
    }
    Logger::Error << "+ + + + + + + + + + + + + + + + + + +\n";
    return -1;
  }
}