00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <iostream>
00019 #include "FileExceptions.h"
00020
00021 using namespace CODEX_Exceptions;
00022
00023 void
00024 FileException::report() const
00025 {
00026 cerr << "At line " << m_line << " of file " << m_fname << endl;
00027 cerr << "File exception for " << m_file << ": ";
00028 derivedMsg();
00029 cerr << endl;
00030 }
00031
00032 void
00033 FileCannotCreateException::derivedMsg() const
00034 {
00035 cerr << "could not create file";
00036 }
00037
00038 void
00039 FileCannotOpenException::derivedMsg() const
00040 {
00041 cerr << "could not open file for reading";
00042 }