MOAB: Mesh Oriented datABase
(version 5.4.1)
|
00001 /* ***************************************************************** 00002 MESQUITE -- The Mesh Quality Improvement Toolkit 00003 00004 Copyright 2004 Lawrence Livermore National Laboratory. Under 00005 the terms of Contract B545069 with the University of Wisconsin -- 00006 Madison, Lawrence Livermore National Laboratory retains certain 00007 rights in this software. 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Lesser General Public 00011 License as published by the Free Software Foundation; either 00012 version 2.1 of the License, or (at your option) any later version. 00013 00014 This library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public License 00020 (lgpl.txt) along with this library; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 00023 [email protected] 00024 00025 ***************************************************************** */ 00026 00027 /*! 00028 \file MsqIBase.cpp 00029 \brief 00030 00031 00032 \author Jason Kraftcheck 00033 \date 2007-08-14 00034 */ 00035 00036 #include "iBase.h" 00037 #include "MsqIBase.hpp" 00038 #include "MsqDebug.hpp" 00039 00040 namespace MBMesquite 00041 { 00042 00043 std::string process_itaps_error( int ierr ) 00044 { 00045 std::string result( "ITAPS ERROR: " ); 00046 switch( ierr ) 00047 { 00048 case iBase_MESH_ALREADY_LOADED: 00049 result += "File Already Loaded"; 00050 break; 00051 case iBase_FILE_NOT_FOUND: 00052 result += "File Not Found"; 00053 break; 00054 case iBase_FILE_WRITE_ERROR: 00055 result += "File Write Error"; 00056 break; 00057 case iBase_NIL_ARRAY: 00058 result += "NULL Array"; 00059 break; 00060 case iBase_BAD_ARRAY_SIZE: 00061 result += "Bad Array Size"; 00062 break; 00063 case iBase_BAD_ARRAY_DIMENSION: 00064 result += "Bad Array Dimension"; 00065 break; 00066 case iBase_INVALID_ENTITY_HANDLE: 00067 result += "Invalid Handle"; 00068 break; 00069 case iBase_INVALID_ENTITY_COUNT: 00070 result += "Invalid Count"; 00071 break; 00072 case iBase_INVALID_ENTITY_TYPE: 00073 result += "Invalid Type"; 00074 break; 00075 case iBase_INVALID_ENTITY_TOPOLOGY: 00076 result += "Invalid Topology"; 00077 break; 00078 case iBase_BAD_TYPE_AND_TOPO: 00079 result += "Invalid Type"; 00080 break; 00081 case iBase_ENTITY_CREATION_ERROR: 00082 result += "Creation Failed"; 00083 break; 00084 case iBase_INVALID_TAG_HANDLE: 00085 result += "Invalid Tag"; 00086 break; 00087 case iBase_TAG_NOT_FOUND: 00088 result += "Tag Not Found"; 00089 break; 00090 case iBase_TAG_ALREADY_EXISTS: 00091 result += "Tag Exists"; 00092 break; 00093 case iBase_TAG_IN_USE: 00094 result += "Tag In Use"; 00095 break; 00096 case iBase_INVALID_ENTITYSET_HANDLE: 00097 result += "Invalid Handle"; 00098 break; 00099 case iBase_INVALID_ITERATOR_HANDLE: 00100 result += "Invalid Iterator"; 00101 break; 00102 case iBase_INVALID_ARGUMENT: 00103 result += "Invalid Argument"; 00104 break; 00105 case iBase_MEMORY_ALLOCATION_FAILED: 00106 result += "Out of Memory"; 00107 break; 00108 case iBase_NOT_SUPPORTED: 00109 result += "Not Supported"; 00110 break; 00111 default: 00112 result += "Uknown/Internal Error"; 00113 break; 00114 } 00115 MSQ_DBGOUT( 1 ) << result << std::endl; 00116 return result; 00117 } 00118 00119 } // namespace MBMesquite