Changeset 20092


Ignore:
Timestamp:
04/26/21 10:09:09 (4 years ago)
Author:
tbretz
Message:
Made consitsent return codes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/fitsdump.cc

    r19946 r20092  
     1//****************************************************************
    12//****************************************************************
    23/** @class FitsDumper
     
    470471        {
    471472            cerr << "Could not open root file '" << filename << "'" << endl;
    472             return -2;
     473            return 8;
    473474        }
    474475    }
     
    11001101
    11011102    if (conf.Get<bool>("header") || conf.Get<bool>("list") || conf.Get<bool>("filecontent"))
     1103        return 0;
     1104
     1105    // ------------------------------------------------------------
     1106
     1107    if (conf.Get<bool>("minmax") && conf.Get<bool>("stat"))
     1108    {
     1109        cerr << "Invalid combination of options: cannot do stats and minmax." << endl;
    11021110        return 1;
    1103 
    1104     // ------------------------------------------------------------
    1105 
    1106     if (conf.Get<bool>("minmax") && conf.Get<bool>("stat"))
    1107     {
    1108         cerr << "Invalid combination of options: cannot do stats and minmax." << endl;
    1109         return -1;
    11101111    }
    11111112    if (conf.Get<bool>("stat") && conf.Get<bool>("nozero"))
    11121113    {
    11131114        cerr << "Invalid combination of options: nozero only works with minmax." << endl;
    1114         return -1;
     1115        return 2;
    11151116    }
    11161117
     
    11181119    {
    11191120        cerr << "Switched --scientific and --fixed are mutually exclusive." << endl;
    1120         return -1;
     1121        return 3;
    11211122    }
    11221123
     
    11241125    {
    11251126        cerr << "Switched --% and --%% are mutually exclusive." << endl;
    1126         return -1;
     1127        return 4;
    11271128    }
    11281129
     
    11481149        {
    11491150            cerr << "Cannot open output stream " << filename << ": " << strerror(errno) << endl;
    1150             return false;
     1151            return 5;
    11511152        }
    11521153        fout.rdbuf(sout.rdbuf());
     
    11801181        {
    11811182            cerr << "Format '" << *it << "' not supported." << endl;
    1182             return -1;
     1183            return 6;
    11831184        }
    11841185    }
     
    11861187    const vector<MyColumn> cols = InitColumns(conf.Vec<string>("col"));
    11871188    if (cols.empty())
    1188         return false;
     1189        return 7;
    11891190
    11901191    if (conf.Get<bool>("minmax"))
Note: See TracChangeset for help on using the changeset viewer.