Changeset 12329 for trunk/Mars/mcore


Ignore:
Timestamp:
10/30/11 22:32:48 (13 years ago)
Author:
tbretz
Message:
Changed the 'define all' and 'define err' in a way that it is less disturbing
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mcore/fits.h

    r11964 r12329  
    2222#include <iostream>
    2323#define gLog cerr
    24 #define err ""
    25 #define all ""
     24#define ___err___ ""
     25#define ___all___ ""
    2626#else
    2727#include "MLog.h"
    2828#include "MLogManip.h"
     29#define ___err___ err
     30#define ___all___ all
    2931#endif
    3032
     
    108110                throw runtime_error(str.str());
    109111#else
    110                 gLog << err << "ERROR - " << str.str() << endl;
     112                gLog << ___err___ << "ERROR - " << str.str() << endl;
    111113                return false;
    112114#endif
     
    120122                throw runtime_error(str.str());
    121123#else
    122                 gLog << err << "ERROR - " << str.str() << endl;
     124                gLog << ___err___ << "ERROR - " << str.str() << endl;
    123125                return false;
    124126#endif
     
    132134                throw runtime_error(str.str());
    133135#else
    134                 gLog << err << "ERROR - " << str.str() << endl;
     136                gLog << ___err___ << "ERROR - " << str.str() << endl;
    135137                return false;
    136138#endif
     
    261263                        throw runtime_error(str.str());
    262264#else
    263                         gLog << err << "ERROR - " << str.str() << endl;
     265                        gLog << ___err___ << "ERROR - " << str.str() << endl;
    264266                        return;
    265267#endif
     
    278280                throw runtime_error("Column size mismatch");
    279281#else
    280                 gLog << err << "ERROR - Column size mismatch" << endl;
     282                gLog << ___err___ << "ERROR - Column size mismatch" << endl;
    281283                return;
    282284#endif
     
    303305                    continue;
    304306
    305                 gLog << all << setw(2) << it->second.type << '|' << it->first << '=' << it->second.value << '/' << it->second.comment << '|' << endl;
     307                gLog << ___all___ << setw(2) << it->second.type << '|' << it->first << '=' << it->second.value << '/' << it->second.comment << '|' << endl;
    306308            }}
    307309
     
    317319            for (Sorted::const_iterator it=sorted.begin(); it!=sorted.end(); it++)
    318320            {
    319                 gLog << all << setw(6) << it->second.offset << "| ";
     321                gLog << ___all___ << setw(6) << it->second.offset << "| ";
    320322                gLog << it->second.num << 'x';
    321323                switch (it->second.type)
     
    352354                throw runtime_error(str.str());
    353355#else
    354                 gLog << err << "ERROR - " << str.str() << endl;
     356                gLog << ___err___ << "ERROR - " << str.str() << endl;
    355357                return 0;
    356358#endif
     
    448450            throw runtime_error("File is not a FITS file.");
    449451#else
    450             gLog << err << "ERROR - File is not a FITS file." << endl;
     452            gLog << ___err___ << "ERROR - File is not a FITS file." << endl;
    451453            return;
    452454#endif
     
    468470                    throw runtime_error("FITS file corrupted.");
    469471#else
    470                     gLog << err << "ERROR - FITS file corrupted." << endl;
     472                    gLog << ___err___ << "ERROR - FITS file corrupted." << endl;
    471473                    return;
    472474#endif
     
    509511                seekg((blks+(rest>0?1:0))*(36*80), ios::cur);
    510512                if (!good())
    511                      gLog << err << "File seems to be incomplete (less data than expected from header)." << endl;
     513                     gLog << ___err___ << "File seems to be incomplete (less data than expected from header)." << endl;
    512514
    513515                fRow   = fTable.num_rows;
     
    591593            throw runtime_error(str.str());
    592594#else
    593             gLog << err << "ERROR - " << str.str() << endl;
     595            gLog << ___err___ << "ERROR - " << str.str() << endl;
    594596            return false;
    595597#endif
     
    604606            throw runtime_error(str.str());
    605607#else
    606             gLog << err << "ERROR - " << str.str() << endl;
     608            gLog << ___err___ << "ERROR - " << str.str() << endl;
    607609            return false;
    608610#endif
     
    617619            throw runtime_error(str.str());
    618620#else
    619             gLog << err << "ERROR - " << str.str() << endl;
     621            gLog << ___err___ << "ERROR - " << str.str() << endl;
    620622            return false;
    621623#endif
     
    664666            throw runtime_error(str.str());
    665667#else
    666             gLog << err << "ERROR - " << str.str() << endl;
     668            gLog << ___err___ << "ERROR - " << str.str() << endl;
    667669            return false;
    668670#endif
Note: See TracChangeset for help on using the changeset viewer.