Changeset 608 in Sophya for trunk/SophyaLib/NTools/datacards.cc


Ignore:
Timestamp:
Nov 20, 1999, 10:03:16 PM (26 years ago)
Author:
ansari
Message:

Mise a niveau try/catch ds datacard.cc - Reza 20/11/99

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/NTools/datacards.cc

    r244 r608  
    1 // $Id: datacards.cc,v 1.2 1999-04-22 16:18:22 ansari Exp $
     1// $Id: datacards.cc,v 1.3 1999-11-20 21:03:16 ansari Exp $
    22//
    33// Datacards, acquisition EROS II
     
    1010#include "machdefs.h"
    1111#include "datacards.h"
     12#include "pexceptions.h"
    1213#include <algorithm>
    1314#include <iostream.h>
     
    100101  if (file == "")  return;
    101102
    102   TRY {
     103  try {
    103104    DoReadFile(file);
    104   } CATCHALL {
     105  } catch(...) {
    105106    char* wdp = getenv("PEIDA_WORK");
    106107    if (wdp) {
     
    110111    }
    111112    else cerr << "DataCards::ReadFile() Error reading file " << fn << "\n";
    112     THROW(fileErr);
    113  
    114   } ENDTRY
     113    throw IOExc("DataCards::ReadFile() Error"); 
     114  }
    115115}
    116116
     
    151151FILE *fip;
    152152
    153 if ( (fip = fopen(fn.c_str(),"r")) == NULL )  THROW(fileErr);
     153if ( (fip = fopen(fn.c_str(),"r")) == NULL ) 
     154  throw IOExc("DataCards::DoReadFile() fopen Error ") ;
    154155while (fgets(line_buff,511,fip) != NULL)
    155156  {
Note: See TracChangeset for help on using the changeset viewer.