UnformattedRead throws NoSuchFileException now
This commit is contained in:
parent
b6b868f98d
commit
48cd2e4268
@ -8,18 +8,23 @@ using namespace std;
|
|||||||
using namespace CosmoTool;
|
using namespace CosmoTool;
|
||||||
|
|
||||||
UnformattedRead::UnformattedRead(const string& fname)
|
UnformattedRead::UnformattedRead(const string& fname)
|
||||||
throw()
|
throw(NoSuchFileException)
|
||||||
{
|
{
|
||||||
f = new ifstream(fname.c_str());
|
f = new ifstream(fname.c_str());
|
||||||
|
if (!*f)
|
||||||
|
throw NoSuchFileException();
|
||||||
|
|
||||||
swapOrdering = false;
|
swapOrdering = false;
|
||||||
cSize = Check_32bits;
|
cSize = Check_32bits;
|
||||||
checkPointRef = checkPointAccum = 0;
|
checkPointRef = checkPointAccum = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
UnformattedRead::UnformattedRead(const char *fname)
|
UnformattedRead::UnformattedRead(const char *fname)
|
||||||
throw()
|
throw(NoSuchFileException)
|
||||||
{
|
{
|
||||||
f = new ifstream(fname);
|
f = new ifstream(fname);
|
||||||
|
if (!*f)
|
||||||
|
throw NoSuchFileException();
|
||||||
swapOrdering = false;
|
swapOrdering = false;
|
||||||
cSize = Check_32bits;
|
cSize = Check_32bits;
|
||||||
checkPointRef = checkPointAccum = 0;
|
checkPointRef = checkPointAccum = 0;
|
||||||
|
@ -25,9 +25,9 @@ namespace CosmoTool
|
|||||||
};
|
};
|
||||||
|
|
||||||
UnformattedRead(const std::string& fname)
|
UnformattedRead(const std::string& fname)
|
||||||
throw ();
|
throw (NoSuchFileException);
|
||||||
UnformattedRead(const char *fname)
|
UnformattedRead(const char *fname)
|
||||||
throw ();
|
throw (NoSuchFileException);
|
||||||
~UnformattedRead();
|
~UnformattedRead();
|
||||||
|
|
||||||
// Todo implement primitive description
|
// Todo implement primitive description
|
||||||
|
Loading…
Reference in New Issue
Block a user