UnformattedRead throws NoSuchFileException now

This commit is contained in:
Guilhem Lavaux 2009-01-09 19:11:05 -06:00
parent b6b868f98d
commit 48cd2e4268
2 changed files with 9 additions and 4 deletions

View File

@ -8,18 +8,23 @@ using namespace std;
using namespace CosmoTool;
UnformattedRead::UnformattedRead(const string& fname)
throw()
throw(NoSuchFileException)
{
f = new ifstream(fname.c_str());
if (!*f)
throw NoSuchFileException();
swapOrdering = false;
cSize = Check_32bits;
checkPointRef = checkPointAccum = 0;
}
UnformattedRead::UnformattedRead(const char *fname)
throw()
throw(NoSuchFileException)
{
f = new ifstream(fname);
if (!*f)
throw NoSuchFileException();
swapOrdering = false;
cSize = Check_32bits;
checkPointRef = checkPointAccum = 0;

View File

@ -25,9 +25,9 @@ namespace CosmoTool
};
UnformattedRead(const std::string& fname)
throw ();
throw (NoSuchFileException);
UnformattedRead(const char *fname)
throw ();
throw (NoSuchFileException);
~UnformattedRead();
// Todo implement primitive description