Branch data Line data Source code
1 : : /* *****************************************************************
2 : : MESQUITE -- The Mesh Quality Improvement Toolkit
3 : :
4 : : Copyright 2004 Lawrence Livermore National Laboratory. Under
5 : : the terms of Contract B545069 with the University of Wisconsin --
6 : : Madison, Lawrence Livermore National Laboratory retains certain
7 : : rights in this software.
8 : :
9 : : This library is free software; you can redistribute it and/or
10 : : modify it under the terms of the GNU Lesser General Public
11 : : License as published by the Free Software Foundation; either
12 : : version 2.1 of the License, or (at your option) any later version.
13 : :
14 : : This library is distributed in the hope that it will be useful,
15 : : but WITHOUT ANY WARRANTY; without even the implied warranty of
16 : : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 : : Lesser General Public License for more details.
18 : :
19 : : You should have received a copy of the GNU Lesser General Public License
20 : : (lgpl.txt) along with this library; if not, write to the Free Software
21 : : Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 : :
23 : : [email protected]
24 : :
25 : : ***************************************************************** */
26 : :
27 : : /*!
28 : : \file MsqIBase.cpp
29 : : \brief
30 : :
31 : :
32 : : \author Jason Kraftcheck
33 : : \date 2007-08-14
34 : : */
35 : :
36 : : #include "iBase.h"
37 : : #include "MsqIBase.hpp"
38 : : #include "MsqDebug.hpp"
39 : :
40 : : namespace MBMesquite
41 : : {
42 : :
43 : 0 : std::string process_itaps_error( int ierr )
44 : : {
45 [ # # ]: 0 : std::string result( "ITAPS ERROR: " );
46 [ # # # # : 0 : switch( ierr )
# # # # #
# # # # #
# # # # #
# # # ]
47 : : {
48 : : case iBase_MESH_ALREADY_LOADED:
49 [ # # ]: 0 : result += "File Already Loaded";
50 : 0 : break;
51 : : case iBase_FILE_NOT_FOUND:
52 [ # # ]: 0 : result += "File Not Found";
53 : 0 : break;
54 : : case iBase_FILE_WRITE_ERROR:
55 [ # # ]: 0 : result += "File Write Error";
56 : 0 : break;
57 : : case iBase_NIL_ARRAY:
58 [ # # ]: 0 : result += "NULL Array";
59 : 0 : break;
60 : : case iBase_BAD_ARRAY_SIZE:
61 [ # # ]: 0 : result += "Bad Array Size";
62 : 0 : break;
63 : : case iBase_BAD_ARRAY_DIMENSION:
64 [ # # ]: 0 : result += "Bad Array Dimension";
65 : 0 : break;
66 : : case iBase_INVALID_ENTITY_HANDLE:
67 [ # # ]: 0 : result += "Invalid Handle";
68 : 0 : break;
69 : : case iBase_INVALID_ENTITY_COUNT:
70 [ # # ]: 0 : result += "Invalid Count";
71 : 0 : break;
72 : : case iBase_INVALID_ENTITY_TYPE:
73 [ # # ]: 0 : result += "Invalid Type";
74 : 0 : break;
75 : : case iBase_INVALID_ENTITY_TOPOLOGY:
76 [ # # ]: 0 : result += "Invalid Topology";
77 : 0 : break;
78 : : case iBase_BAD_TYPE_AND_TOPO:
79 [ # # ]: 0 : result += "Invalid Type";
80 : 0 : break;
81 : : case iBase_ENTITY_CREATION_ERROR:
82 [ # # ]: 0 : result += "Creation Failed";
83 : 0 : break;
84 : : case iBase_INVALID_TAG_HANDLE:
85 [ # # ]: 0 : result += "Invalid Tag";
86 : 0 : break;
87 : : case iBase_TAG_NOT_FOUND:
88 [ # # ]: 0 : result += "Tag Not Found";
89 : 0 : break;
90 : : case iBase_TAG_ALREADY_EXISTS:
91 [ # # ]: 0 : result += "Tag Exists";
92 : 0 : break;
93 : : case iBase_TAG_IN_USE:
94 [ # # ]: 0 : result += "Tag In Use";
95 : 0 : break;
96 : : case iBase_INVALID_ENTITYSET_HANDLE:
97 [ # # ]: 0 : result += "Invalid Handle";
98 : 0 : break;
99 : : case iBase_INVALID_ITERATOR_HANDLE:
100 [ # # ]: 0 : result += "Invalid Iterator";
101 : 0 : break;
102 : : case iBase_INVALID_ARGUMENT:
103 [ # # ]: 0 : result += "Invalid Argument";
104 : 0 : break;
105 : : case iBase_MEMORY_ALLOCATION_FAILED:
106 [ # # ]: 0 : result += "Out of Memory";
107 : 0 : break;
108 : : case iBase_NOT_SUPPORTED:
109 [ # # ]: 0 : result += "Not Supported";
110 : 0 : break;
111 : : default:
112 [ # # ]: 0 : result += "Uknown/Internal Error";
113 : 0 : break;
114 : : }
115 : : MSQ_DBGOUT( 1 ) << result << std::endl;
116 : 0 : return result;
117 : : }
118 : :
119 [ + - ][ + - ]: 8 : } // namespace MBMesquite
|