Panda3D
|
00001 // Filename: fltError.cxx 00002 // Created by: drose (24Aug00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #include "fltError.h" 00016 00017 ostream & 00018 operator << (ostream &out, FltError error) { 00019 switch (error) { 00020 case FE_ok: 00021 return out << "no error"; 00022 00023 case FE_could_not_open: 00024 return out << "could not open file"; 00025 00026 case FE_empty_file: 00027 return out << "empty file"; 00028 00029 case FE_end_of_file: 00030 return out << "unexpected end of file"; 00031 00032 case FE_read_error: 00033 return out << "read error on file"; 00034 00035 case FE_invalid_record: 00036 return out << "invalid record"; 00037 00038 case FE_extra_data: 00039 return out << "extra data at end of file"; 00040 00041 case FE_write_error: 00042 return out << "write error on file"; 00043 00044 case FE_bad_data: 00045 return out << "bad data"; 00046 00047 case FE_not_implemented: 00048 return out << "not implemented"; 00049 00050 case FE_internal: 00051 return out << "internal error"; 00052 00053 default: 00054 return out << "unknown error " << (int)error; 00055 } 00056 }