00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "fltError.h"
00020
00021 ostream &
00022 operator << (ostream &out, FltError error) {
00023 switch (error) {
00024 case FE_ok:
00025 return out << "no error";
00026
00027 case FE_could_not_open:
00028 return out << "could not open file";
00029
00030 case FE_empty_file:
00031 return out << "empty file";
00032
00033 case FE_end_of_file:
00034 return out << "unexpected end of file";
00035
00036 case FE_read_error:
00037 return out << "read error on file";
00038
00039 case FE_invalid_record:
00040 return out << "invalid record";
00041
00042 case FE_extra_data:
00043 return out << "extra data at end of file";
00044
00045 case FE_write_error:
00046 return out << "write error on file";
00047
00048 case FE_bad_data:
00049 return out << "bad data";
00050
00051 case FE_not_implemented:
00052 return out << "not implemented";
00053
00054 case FE_internal:
00055 return out << "internal error";
00056
00057 default:
00058 return out << "unknown error " << (int)error;
00059 }
00060 }