From 70a468848ea9fcb4bf3b85aaf878aacfd41e626e Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@uliege.be> Date: Tue, 25 Aug 2020 16:29:57 +0200 Subject: [PATCH] catch(...) in gmshc, as string message is not used --- api/GenApi.py | 2 +- api/gmshc.cpp | 572 +++++++++++++++++++++++++------------------------- 2 files changed, 287 insertions(+), 287 deletions(-) diff --git a/api/GenApi.py b/api/GenApi.py index ec17869232..47af8a52e1 100644 --- a/api/GenApi.py +++ b/api/GenApi.py @@ -1278,7 +1278,7 @@ class API: fc.write(cpp_namespace + name + "(" + ", ".join(list((a.c_arg for a in args))) + ");\n") fc.write("".join((a.c_post for a in args))) - fc.write(" }\n catch(const std::string &api_error_){\n " + + fc.write(" }\n catch(...){\n " + "if(ierr) *ierr = 1;\n }\n") if rtype: fc.write(" return result_api_;\n") diff --git a/api/gmshc.cpp b/api/gmshc.cpp index b419c6d3a4..05be634e30 100644 --- a/api/gmshc.cpp +++ b/api/gmshc.cpp @@ -76,7 +76,7 @@ GMSH_API void gmshInitialize(int argc, char ** argv, const int readConfigFiles, try { gmsh::initialize(argc, argv, readConfigFiles); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -87,7 +87,7 @@ GMSH_API void gmshFinalize(int * ierr) try { gmsh::finalize(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -98,7 +98,7 @@ GMSH_API void gmshOpen(const char * fileName, int * ierr) try { gmsh::open(fileName); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -109,7 +109,7 @@ GMSH_API void gmshMerge(const char * fileName, int * ierr) try { gmsh::merge(fileName); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -120,7 +120,7 @@ GMSH_API void gmshWrite(const char * fileName, int * ierr) try { gmsh::write(fileName); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -131,7 +131,7 @@ GMSH_API void gmshClear(int * ierr) try { gmsh::clear(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -142,7 +142,7 @@ GMSH_API void gmshOptionSetNumber(const char * name, const double value, int * i try { gmsh::option::setNumber(name, value); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -153,7 +153,7 @@ GMSH_API void gmshOptionGetNumber(const char * name, double * value, int * ierr) try { gmsh::option::getNumber(name, *value); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -164,7 +164,7 @@ GMSH_API void gmshOptionSetString(const char * name, const char * value, int * i try { gmsh::option::setString(name, value); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -177,7 +177,7 @@ GMSH_API void gmshOptionGetString(const char * name, char ** value, int * ierr) gmsh::option::getString(name, api_value_); *value = strdup(api_value_.c_str()); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -188,7 +188,7 @@ GMSH_API void gmshOptionSetColor(const char * name, const int r, const int g, co try { gmsh::option::setColor(name, r, g, b, a); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -199,7 +199,7 @@ GMSH_API void gmshOptionGetColor(const char * name, int * r, int * g, int * b, i try { gmsh::option::getColor(name, *r, *g, *b, *a); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -210,7 +210,7 @@ GMSH_API void gmshModelAdd(const char * name, int * ierr) try { gmsh::model::add(name); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -221,7 +221,7 @@ GMSH_API void gmshModelRemove(int * ierr) try { gmsh::model::remove(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -234,7 +234,7 @@ GMSH_API void gmshModelList(char *** names, size_t * names_n, int * ierr) gmsh::model::list(api_names_); vectorstring2charptrptr(api_names_, names, names_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -247,7 +247,7 @@ GMSH_API void gmshModelGetCurrent(char ** name, int * ierr) gmsh::model::getCurrent(api_name_); *name = strdup(api_name_.c_str()); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -258,7 +258,7 @@ GMSH_API void gmshModelSetCurrent(const char * name, int * ierr) try { gmsh::model::setCurrent(name); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -271,7 +271,7 @@ GMSH_API void gmshModelGetEntities(int ** dimTags, size_t * dimTags_n, const int gmsh::model::getEntities(api_dimTags_, dim); vectorpair2intptr(api_dimTags_, dimTags, dimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -282,7 +282,7 @@ GMSH_API void gmshModelSetEntityName(const int dim, const int tag, const char * try { gmsh::model::setEntityName(dim, tag, name); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -295,7 +295,7 @@ GMSH_API void gmshModelGetEntityName(const int dim, const int tag, char ** name, gmsh::model::getEntityName(dim, tag, api_name_); *name = strdup(api_name_.c_str()); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -308,7 +308,7 @@ GMSH_API void gmshModelGetPhysicalGroups(int ** dimTags, size_t * dimTags_n, con gmsh::model::getPhysicalGroups(api_dimTags_, dim); vectorpair2intptr(api_dimTags_, dimTags, dimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -321,7 +321,7 @@ GMSH_API void gmshModelGetEntitiesForPhysicalGroup(const int dim, const int tag, gmsh::model::getEntitiesForPhysicalGroup(dim, tag, api_tags_); vector2ptr(api_tags_, tags, tags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -334,7 +334,7 @@ GMSH_API void gmshModelGetPhysicalGroupsForEntity(const int dim, const int tag, gmsh::model::getPhysicalGroupsForEntity(dim, tag, api_physicalTags_); vector2ptr(api_physicalTags_, physicalTags, physicalTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -347,7 +347,7 @@ GMSH_API int gmshModelAddPhysicalGroup(const int dim, int * tags, size_t tags_n, std::vector<int> api_tags_(tags, tags + tags_n); result_api_ = gmsh::model::addPhysicalGroup(dim, api_tags_, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -359,7 +359,7 @@ GMSH_API void gmshModelSetPhysicalName(const int dim, const int tag, const char try { gmsh::model::setPhysicalName(dim, tag, name); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -372,7 +372,7 @@ GMSH_API void gmshModelGetPhysicalName(const int dim, const int tag, char ** nam gmsh::model::getPhysicalName(dim, tag, api_name_); *name = strdup(api_name_.c_str()); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -390,7 +390,7 @@ GMSH_API void gmshModelGetBoundary(int * dimTags, size_t dimTags_n, int ** outDi gmsh::model::getBoundary(api_dimTags_, api_outDimTags_, combined, oriented, recursive); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -403,7 +403,7 @@ GMSH_API void gmshModelGetEntitiesInBoundingBox(const double xmin, const double gmsh::model::getEntitiesInBoundingBox(xmin, ymin, zmin, xmax, ymax, zmax, api_tags_, dim); vectorpair2intptr(api_tags_, tags, tags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -414,7 +414,7 @@ GMSH_API void gmshModelGetBoundingBox(const int dim, const int tag, double * xmi try { gmsh::model::getBoundingBox(dim, tag, *xmin, *ymin, *zmin, *xmax, *ymax, *zmax); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -426,7 +426,7 @@ GMSH_API int gmshModelGetDimension(int * ierr) try { result_api_ = gmsh::model::getDimension(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -440,7 +440,7 @@ GMSH_API int gmshModelAddDiscreteEntity(const int dim, const int tag, int * boun std::vector<int> api_boundary_(boundary, boundary + boundary_n); result_api_ = gmsh::model::addDiscreteEntity(dim, tag, api_boundary_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -457,7 +457,7 @@ GMSH_API void gmshModelRemoveEntities(int * dimTags, size_t dimTags_n, const int } gmsh::model::removeEntities(api_dimTags_, recursive); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -468,7 +468,7 @@ GMSH_API void gmshModelRemoveEntityName(const char * name, int * ierr) try { gmsh::model::removeEntityName(name); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -484,7 +484,7 @@ GMSH_API void gmshModelRemovePhysicalGroups(int * dimTags, size_t dimTags_n, int } gmsh::model::removePhysicalGroups(api_dimTags_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -495,7 +495,7 @@ GMSH_API void gmshModelRemovePhysicalName(const char * name, int * ierr) try { gmsh::model::removePhysicalName(name); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -508,7 +508,7 @@ GMSH_API void gmshModelGetType(const int dim, const int tag, char ** entityType, gmsh::model::getType(dim, tag, api_entityType_); *entityType = strdup(api_entityType_.c_str()); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -519,7 +519,7 @@ GMSH_API void gmshModelGetParent(const int dim, const int tag, int * parentDim, try { gmsh::model::getParent(dim, tag, *parentDim, *parentTag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -532,7 +532,7 @@ GMSH_API void gmshModelGetPartitions(const int dim, const int tag, int ** partit gmsh::model::getPartitions(dim, tag, api_partitions_); vector2ptr(api_partitions_, partitions, partitions_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -546,7 +546,7 @@ GMSH_API void gmshModelGetValue(const int dim, const int tag, double * parametri gmsh::model::getValue(dim, tag, api_parametricCoord_, api_coord_); vector2ptr(api_coord_, coord, coord_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -560,7 +560,7 @@ GMSH_API void gmshModelGetDerivative(const int dim, const int tag, double * para gmsh::model::getDerivative(dim, tag, api_parametricCoord_, api_derivatives_); vector2ptr(api_derivatives_, derivatives, derivatives_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -574,7 +574,7 @@ GMSH_API void gmshModelGetCurvature(const int dim, const int tag, double * param gmsh::model::getCurvature(dim, tag, api_parametricCoord_, api_curvatures_); vector2ptr(api_curvatures_, curvatures, curvatures_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -594,7 +594,7 @@ GMSH_API void gmshModelGetPrincipalCurvatures(const int tag, double * parametric vector2ptr(api_directionMax_, directionMax, directionMax_n); vector2ptr(api_directionMin_, directionMin, directionMin_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -608,7 +608,7 @@ GMSH_API void gmshModelGetNormal(const int tag, double * parametricCoord, size_t gmsh::model::getNormal(tag, api_parametricCoord_, api_normals_); vector2ptr(api_normals_, normals, normals_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -622,7 +622,7 @@ GMSH_API void gmshModelGetParametrization(const int dim, const int tag, double * gmsh::model::getParametrization(dim, tag, api_coord_, api_parametricCoord_); vector2ptr(api_parametricCoord_, parametricCoord, parametricCoord_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -637,7 +637,7 @@ GMSH_API void gmshModelGetParametrizationBounds(const int dim, const int tag, do vector2ptr(api_min_, min, min_n); vector2ptr(api_max_, max, max_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -650,7 +650,7 @@ GMSH_API int gmshModelIsInside(const int dim, const int tag, double * parametric std::vector<double> api_parametricCoord_(parametricCoord, parametricCoord + parametricCoord_n); result_api_ = gmsh::model::isInside(dim, tag, api_parametricCoord_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -667,7 +667,7 @@ GMSH_API void gmshModelGetClosestPoint(const int dim, const int tag, double * co vector2ptr(api_closestCoord_, closestCoord, closestCoord_n); vector2ptr(api_parametricCoord_, parametricCoord, parametricCoord_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -681,7 +681,7 @@ GMSH_API void gmshModelReparametrizeOnSurface(const int dim, const int tag, doub gmsh::model::reparametrizeOnSurface(dim, tag, api_parametricCoord_, surfaceTag, api_surfaceParametricCoord_, which); vector2ptr(api_surfaceParametricCoord_, surfaceParametricCoord, surfaceParametricCoord_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -697,7 +697,7 @@ GMSH_API void gmshModelSetVisibility(int * dimTags, size_t dimTags_n, const int } gmsh::model::setVisibility(api_dimTags_, value, recursive); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -708,7 +708,7 @@ GMSH_API void gmshModelGetVisibility(const int dim, const int tag, int * value, try { gmsh::model::getVisibility(dim, tag, *value); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -724,7 +724,7 @@ GMSH_API void gmshModelSetColor(int * dimTags, size_t dimTags_n, const int r, co } gmsh::model::setColor(api_dimTags_, r, g, b, a, recursive); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -735,7 +735,7 @@ GMSH_API void gmshModelGetColor(const int dim, const int tag, int * r, int * g, try { gmsh::model::getColor(dim, tag, *r, *g, *b, *a); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -746,7 +746,7 @@ GMSH_API void gmshModelSetCoordinates(const int tag, const double x, const doubl try { gmsh::model::setCoordinates(tag, x, y, z); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -757,7 +757,7 @@ GMSH_API void gmshModelMeshGenerate(const int dim, int * ierr) try { gmsh::model::mesh::generate(dim); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -768,7 +768,7 @@ GMSH_API void gmshModelMeshPartition(const int numPart, int * ierr) try { gmsh::model::mesh::partition(numPart); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -779,7 +779,7 @@ GMSH_API void gmshModelMeshUnpartition(int * ierr) try { gmsh::model::mesh::unpartition(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -795,7 +795,7 @@ GMSH_API void gmshModelMeshOptimize(const char * method, const int force, const } gmsh::model::mesh::optimize(method, force, niter, api_dimTags_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -806,7 +806,7 @@ GMSH_API void gmshModelMeshRecombine(int * ierr) try { gmsh::model::mesh::recombine(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -817,7 +817,7 @@ GMSH_API void gmshModelMeshRefine(int * ierr) try { gmsh::model::mesh::refine(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -828,7 +828,7 @@ GMSH_API void gmshModelMeshSetOrder(const int order, int * ierr) try { gmsh::model::mesh::setOrder(order); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -841,7 +841,7 @@ GMSH_API void gmshModelMeshGetLastEntityError(int ** dimTags, size_t * dimTags_n gmsh::model::mesh::getLastEntityError(api_dimTags_); vectorpair2intptr(api_dimTags_, dimTags, dimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -854,7 +854,7 @@ GMSH_API void gmshModelMeshGetLastNodeError(size_t ** nodeTags, size_t * nodeTag gmsh::model::mesh::getLastNodeError(api_nodeTags_); vector2ptr(api_nodeTags_, nodeTags, nodeTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -870,7 +870,7 @@ GMSH_API void gmshModelMeshClear(int * dimTags, size_t dimTags_n, int * ierr) } gmsh::model::mesh::clear(api_dimTags_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -887,7 +887,7 @@ GMSH_API void gmshModelMeshGetNodes(size_t ** nodeTags, size_t * nodeTags_n, dou vector2ptr(api_coord_, coord, coord_n); vector2ptr(api_parametricCoord_, parametricCoord, parametricCoord_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -904,7 +904,7 @@ GMSH_API void gmshModelMeshGetNodesByElementType(const int elementType, size_t * vector2ptr(api_coord_, coord, coord_n); vector2ptr(api_parametricCoord_, parametricCoord, parametricCoord_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -919,7 +919,7 @@ GMSH_API void gmshModelMeshGetNode(const size_t nodeTag, double ** coord, size_t vector2ptr(api_coord_, coord, coord_n); vector2ptr(api_parametricCoord_, parametricCoord, parametricCoord_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -932,7 +932,7 @@ GMSH_API void gmshModelMeshSetNode(const size_t nodeTag, double * coord, size_t std::vector<double> api_parametricCoord_(parametricCoord, parametricCoord + parametricCoord_n); gmsh::model::mesh::setNode(nodeTag, api_coord_, api_parametricCoord_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -943,7 +943,7 @@ GMSH_API void gmshModelMeshRebuildNodeCache(const int onlyIfNecessary, int * ier try { gmsh::model::mesh::rebuildNodeCache(onlyIfNecessary); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -954,7 +954,7 @@ GMSH_API void gmshModelMeshRebuildElementCache(const int onlyIfNecessary, int * try { gmsh::model::mesh::rebuildElementCache(onlyIfNecessary); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -969,7 +969,7 @@ GMSH_API void gmshModelMeshGetNodesForPhysicalGroup(const int dim, const int tag vector2ptr(api_nodeTags_, nodeTags, nodeTags_n); vector2ptr(api_coord_, coord, coord_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -983,7 +983,7 @@ GMSH_API void gmshModelMeshAddNodes(const int dim, const int tag, size_t * nodeT std::vector<double> api_parametricCoord_(parametricCoord, parametricCoord + parametricCoord_n); gmsh::model::mesh::addNodes(dim, tag, api_nodeTags_, api_coord_, api_parametricCoord_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -994,7 +994,7 @@ GMSH_API void gmshModelMeshReclassifyNodes(int * ierr) try { gmsh::model::mesh::reclassifyNodes(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1005,7 +1005,7 @@ GMSH_API void gmshModelMeshRelocateNodes(const int dim, const int tag, int * ier try { gmsh::model::mesh::relocateNodes(dim, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1022,7 +1022,7 @@ GMSH_API void gmshModelMeshGetElements(int ** elementTypes, size_t * elementType vectorvector2ptrptr(api_elementTags_, elementTags, elementTags_n, elementTags_nn); vectorvector2ptrptr(api_nodeTags_, nodeTags, nodeTags_n, nodeTags_nn); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1035,7 +1035,7 @@ GMSH_API void gmshModelMeshGetElement(const size_t elementTag, int * elementType gmsh::model::mesh::getElement(elementTag, *elementType, api_nodeTags_); vector2ptr(api_nodeTags_, nodeTags, nodeTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1048,7 +1048,7 @@ GMSH_API void gmshModelMeshGetElementByCoordinates(const double x, const double gmsh::model::mesh::getElementByCoordinates(x, y, z, *elementTag, *elementType, api_nodeTags_, *u, *v, *w, dim, strict); vector2ptr(api_nodeTags_, nodeTags, nodeTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1061,7 +1061,7 @@ GMSH_API void gmshModelMeshGetElementsByCoordinates(const double x, const double gmsh::model::mesh::getElementsByCoordinates(x, y, z, api_elementTags_, dim, strict); vector2ptr(api_elementTags_, elementTags, elementTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1072,7 +1072,7 @@ GMSH_API void gmshModelMeshGetLocalCoordinatesInElement(const size_t elementTag, try { gmsh::model::mesh::getLocalCoordinatesInElement(elementTag, x, y, z, *u, *v, *w); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1085,7 +1085,7 @@ GMSH_API void gmshModelMeshGetElementTypes(int ** elementTypes, size_t * element gmsh::model::mesh::getElementTypes(api_elementTypes_, dim, tag); vector2ptr(api_elementTypes_, elementTypes, elementTypes_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1097,7 +1097,7 @@ GMSH_API int gmshModelMeshGetElementType(const char * familyName, const int orde try { result_api_ = gmsh::model::mesh::getElementType(familyName, order, serendip); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -1113,7 +1113,7 @@ GMSH_API void gmshModelMeshGetElementProperties(const int elementType, char ** e *elementName = strdup(api_elementName_.c_str()); vector2ptr(api_localNodeCoord_, localNodeCoord, localNodeCoord_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1128,7 +1128,7 @@ GMSH_API void gmshModelMeshGetElementsByType(const int elementType, size_t ** el vector2ptr(api_elementTags_, elementTags, elementTags_n); vector2ptr(api_nodeTags_, nodeTags, nodeTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1143,7 +1143,7 @@ GMSH_API void gmshModelMeshPreallocateElementsByType(const int elementType, cons vector2ptr(api_elementTags_, elementTags, elementTags_n); vector2ptr(api_nodeTags_, nodeTags, nodeTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1161,7 +1161,7 @@ GMSH_API void gmshModelMeshAddElements(const int dim, const int tag, int * eleme api_nodeTags_[i] = std::vector<std::size_t>(nodeTags[i], nodeTags[i] + nodeTags_n[i]); gmsh::model::mesh::addElements(dim, tag, api_elementTypes_, api_elementTags_, api_nodeTags_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1174,7 +1174,7 @@ GMSH_API void gmshModelMeshAddElementsByType(const int tag, const int elementTyp std::vector<std::size_t> api_nodeTags_(nodeTags, nodeTags + nodeTags_n); gmsh::model::mesh::addElementsByType(tag, elementType, api_elementTags_, api_nodeTags_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1189,7 +1189,7 @@ GMSH_API void gmshModelMeshGetIntegrationPoints(const int elementType, const cha vector2ptr(api_localCoord_, localCoord, localCoord_n); vector2ptr(api_weights_, weights, weights_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1207,7 +1207,7 @@ GMSH_API void gmshModelMeshGetJacobians(const int elementType, double * localCoo vector2ptr(api_determinants_, determinants, determinants_n); vector2ptr(api_coord_, coord, coord_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1224,7 +1224,7 @@ GMSH_API void gmshModelMeshPreallocateJacobians(const int elementType, const int vector2ptr(api_determinants_, determinants, determinants_n); vector2ptr(api_coord_, coord, coord_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1242,7 +1242,7 @@ GMSH_API void gmshModelMeshGetJacobian(const size_t elementTag, double * localCo vector2ptr(api_determinants_, determinants, determinants_n); vector2ptr(api_coord_, coord, coord_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1257,7 +1257,7 @@ GMSH_API void gmshModelMeshGetBasisFunctions(const int elementType, double * loc gmsh::model::mesh::getBasisFunctions(elementType, api_localCoord_, functionSpaceType, *numComponents, api_basisFunctions_, *numOrientations, api_wantedOrientations_); vector2ptr(api_basisFunctions_, basisFunctions, basisFunctions_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1270,7 +1270,7 @@ GMSH_API void gmshModelMeshGetBasisFunctionsOrientationForElements(const int ele gmsh::model::mesh::getBasisFunctionsOrientationForElements(elementType, functionSpaceType, api_basisFunctionsOrientation_, tag, task, numTasks); vector2ptr(api_basisFunctionsOrientation_, basisFunctionsOrientation, basisFunctionsOrientation_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1281,7 +1281,7 @@ GMSH_API void gmshModelMeshGetBasisFunctionsOrientationForElement(const size_t e try { gmsh::model::mesh::getBasisFunctionsOrientationForElement(elementTag, functionSpaceType, *basisFunctionsOrientation); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1293,7 +1293,7 @@ GMSH_API int gmshModelMeshGetNumberOfOrientations(const int elementType, const c try { result_api_ = gmsh::model::mesh::getNumberOfOrientations(elementType, functionSpaceType); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -1307,7 +1307,7 @@ GMSH_API void gmshModelMeshPreallocateBasisFunctionsOrientationForElements(const gmsh::model::mesh::preallocateBasisFunctionsOrientationForElements(elementType, api_basisFunctionsOrientation_, tag); vector2ptr(api_basisFunctionsOrientation_, basisFunctionsOrientation, basisFunctionsOrientation_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1321,7 +1321,7 @@ GMSH_API void gmshModelMeshGetEdgeNumber(int * edgeNodes, size_t edgeNodes_n, in gmsh::model::mesh::getEdgeNumber(api_edgeNodes_, api_edgeNum_); vector2ptr(api_edgeNum_, edgeNum, edgeNum_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1334,7 +1334,7 @@ GMSH_API void gmshModelMeshGetLocalMultipliersForHcurl0(const int elementType, i gmsh::model::mesh::getLocalMultipliersForHcurl0(elementType, api_localMultipliers_, tag); vector2ptr(api_localMultipliers_, localMultipliers, localMultipliers_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1349,7 +1349,7 @@ GMSH_API void gmshModelMeshGetKeysForElements(const int elementType, const char vectorpair2intptr(api_keys_, keys, keys_n); vector2ptr(api_coord_, coord, coord_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1364,7 +1364,7 @@ GMSH_API void gmshModelMeshGetKeysForElement(const size_t elementTag, const char vectorpair2intptr(api_keys_, keys, keys_n); vector2ptr(api_coord_, coord, coord_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1376,7 +1376,7 @@ GMSH_API int gmshModelMeshGetNumberOfKeysForElements(const int elementType, cons try { result_api_ = gmsh::model::mesh::getNumberOfKeysForElements(elementType, functionSpaceType); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -1395,7 +1395,7 @@ GMSH_API void gmshModelMeshGetInformationForElements(int * keys, size_t keys_n, gmsh::model::mesh::getInformationForElements(api_keys_, elementType, functionSpaceType, api_infoKeys_); vectorpair2intptr(api_infoKeys_, infoKeys, infoKeys_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1408,7 +1408,7 @@ GMSH_API void gmshModelMeshGetBarycenters(const int elementType, const int tag, gmsh::model::mesh::getBarycenters(elementType, tag, fast, primary, api_barycenters_, task, numTasks); vector2ptr(api_barycenters_, barycenters, barycenters_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1421,7 +1421,7 @@ GMSH_API void gmshModelMeshPreallocateBarycenters(const int elementType, double gmsh::model::mesh::preallocateBarycenters(elementType, api_barycenters_, tag); vector2ptr(api_barycenters_, barycenters, barycenters_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1434,7 +1434,7 @@ GMSH_API void gmshModelMeshGetElementEdgeNodes(const int elementType, size_t ** gmsh::model::mesh::getElementEdgeNodes(elementType, api_nodeTags_, tag, primary, task, numTasks); vector2ptr(api_nodeTags_, nodeTags, nodeTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1447,7 +1447,7 @@ GMSH_API void gmshModelMeshGetElementFaceNodes(const int elementType, const int gmsh::model::mesh::getElementFaceNodes(elementType, faceType, api_nodeTags_, tag, primary, task, numTasks); vector2ptr(api_nodeTags_, nodeTags, nodeTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1462,7 +1462,7 @@ GMSH_API void gmshModelMeshGetGhostElements(const int dim, const int tag, size_t vector2ptr(api_elementTags_, elementTags, elementTags_n); vector2ptr(api_partitions_, partitions, partitions_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1478,7 +1478,7 @@ GMSH_API void gmshModelMeshSetSize(int * dimTags, size_t dimTags_n, const double } gmsh::model::mesh::setSize(api_dimTags_, size); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1491,7 +1491,7 @@ GMSH_API void gmshModelMeshSetSizeAtParametricPoints(const int dim, const int ta std::vector<double> api_sizes_(sizes, sizes + sizes_n); gmsh::model::mesh::setSizeAtParametricPoints(dim, tag, api_parametricCoord_, api_sizes_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1502,7 +1502,7 @@ GMSH_API void gmshModelMeshSetTransfiniteCurve(const int tag, const int numNodes try { gmsh::model::mesh::setTransfiniteCurve(tag, numNodes, meshType, coef); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1514,7 +1514,7 @@ GMSH_API void gmshModelMeshSetTransfiniteSurface(const int tag, const char * arr std::vector<int> api_cornerTags_(cornerTags, cornerTags + cornerTags_n); gmsh::model::mesh::setTransfiniteSurface(tag, arrangement, api_cornerTags_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1526,7 +1526,7 @@ GMSH_API void gmshModelMeshSetTransfiniteVolume(const int tag, int * cornerTags, std::vector<int> api_cornerTags_(cornerTags, cornerTags + cornerTags_n); gmsh::model::mesh::setTransfiniteVolume(tag, api_cornerTags_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1542,7 +1542,7 @@ GMSH_API void gmshModelMeshSetTransfiniteAutomatic(int * dimTags, size_t dimTags } gmsh::model::mesh::setTransfiniteAutomatic(api_dimTags_, cornerAngle, recombine); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1553,7 +1553,7 @@ GMSH_API void gmshModelMeshSetRecombine(const int dim, const int tag, int * ierr try { gmsh::model::mesh::setRecombine(dim, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1564,7 +1564,7 @@ GMSH_API void gmshModelMeshSetSmoothing(const int dim, const int tag, const int try { gmsh::model::mesh::setSmoothing(dim, tag, val); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1575,7 +1575,7 @@ GMSH_API void gmshModelMeshSetReverse(const int dim, const int tag, const int va try { gmsh::model::mesh::setReverse(dim, tag, val); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1586,7 +1586,7 @@ GMSH_API void gmshModelMeshSetAlgorithm(const int dim, const int tag, const int try { gmsh::model::mesh::setAlgorithm(dim, tag, val); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1597,7 +1597,7 @@ GMSH_API void gmshModelMeshSetSizeFromBoundary(const int dim, const int tag, con try { gmsh::model::mesh::setSizeFromBoundary(dim, tag, val); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1609,7 +1609,7 @@ GMSH_API void gmshModelMeshSetCompound(const int dim, int * tags, size_t tags_n, std::vector<int> api_tags_(tags, tags + tags_n); gmsh::model::mesh::setCompound(dim, api_tags_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1620,7 +1620,7 @@ GMSH_API void gmshModelMeshSetOutwardOrientation(const int tag, int * ierr) try { gmsh::model::mesh::setOutwardOrientation(tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1632,7 +1632,7 @@ GMSH_API void gmshModelMeshEmbed(const int dim, int * tags, size_t tags_n, const std::vector<int> api_tags_(tags, tags + tags_n); gmsh::model::mesh::embed(dim, api_tags_, inDim, inTag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1648,7 +1648,7 @@ GMSH_API void gmshModelMeshRemoveEmbedded(int * dimTags, size_t dimTags_n, const } gmsh::model::mesh::removeEmbedded(api_dimTags_, dim); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1660,7 +1660,7 @@ GMSH_API void gmshModelMeshReorderElements(const int elementType, const int tag, std::vector<std::size_t> api_ordering_(ordering, ordering + ordering_n); gmsh::model::mesh::reorderElements(elementType, tag, api_ordering_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1671,7 +1671,7 @@ GMSH_API void gmshModelMeshRenumberNodes(int * ierr) try { gmsh::model::mesh::renumberNodes(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1682,7 +1682,7 @@ GMSH_API void gmshModelMeshRenumberElements(int * ierr) try { gmsh::model::mesh::renumberElements(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1696,7 +1696,7 @@ GMSH_API void gmshModelMeshSetPeriodic(const int dim, int * tags, size_t tags_n, std::vector<double> api_affineTransform_(affineTransform, affineTransform + affineTransform_n); gmsh::model::mesh::setPeriodic(dim, api_tags_, api_tagsMaster_, api_affineTransform_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1713,7 +1713,7 @@ GMSH_API void gmshModelMeshGetPeriodicNodes(const int dim, const int tag, int * vector2ptr(api_nodeTagsMaster_, nodeTagsMaster, nodeTagsMaster_n); vector2ptr(api_affineTransform_, affineTransform, affineTransform_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1724,7 +1724,7 @@ GMSH_API void gmshModelMeshRemoveDuplicateNodes(int * ierr) try { gmsh::model::mesh::removeDuplicateNodes(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1735,7 +1735,7 @@ GMSH_API void gmshModelMeshSplitQuadrangles(const double quality, const int tag, try { gmsh::model::mesh::splitQuadrangles(quality, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1746,7 +1746,7 @@ GMSH_API void gmshModelMeshClassifySurfaces(const double angle, const int bounda try { gmsh::model::mesh::classifySurfaces(angle, boundary, forReparametrization, curveAngle); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1762,7 +1762,7 @@ GMSH_API void gmshModelMeshCreateGeometry(int * dimTags, size_t dimTags_n, int * } gmsh::model::mesh::createGeometry(api_dimTags_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1773,7 +1773,7 @@ GMSH_API void gmshModelMeshCreateTopology(const int makeSimplyConnected, const i try { gmsh::model::mesh::createTopology(makeSimplyConnected, exportDiscrete); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1787,7 +1787,7 @@ GMSH_API void gmshModelMeshComputeHomology(int * domainTags, size_t domainTags_n std::vector<int> api_dims_(dims, dims + dims_n); gmsh::model::mesh::computeHomology(api_domainTags_, api_subdomainTags_, api_dims_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1801,7 +1801,7 @@ GMSH_API void gmshModelMeshComputeCohomology(int * domainTags, size_t domainTags std::vector<int> api_dims_(dims, dims + dims_n); gmsh::model::mesh::computeCohomology(api_domainTags_, api_subdomainTags_, api_dims_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1814,7 +1814,7 @@ GMSH_API void gmshModelMeshComputeCrossField(int ** viewTags, size_t * viewTags_ gmsh::model::mesh::computeCrossField(api_viewTags_); vector2ptr(api_viewTags_, viewTags, viewTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1826,7 +1826,7 @@ GMSH_API int gmshModelMeshFieldAdd(const char * fieldType, const int tag, int * try { result_api_ = gmsh::model::mesh::field::add(fieldType, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -1838,7 +1838,7 @@ GMSH_API void gmshModelMeshFieldRemove(const int tag, int * ierr) try { gmsh::model::mesh::field::remove(tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1849,7 +1849,7 @@ GMSH_API void gmshModelMeshFieldSetNumber(const int tag, const char * option, co try { gmsh::model::mesh::field::setNumber(tag, option, value); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1860,7 +1860,7 @@ GMSH_API void gmshModelMeshFieldSetString(const int tag, const char * option, co try { gmsh::model::mesh::field::setString(tag, option, value); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1872,7 +1872,7 @@ GMSH_API void gmshModelMeshFieldSetNumbers(const int tag, const char * option, d std::vector<double> api_value_(value, value + value_n); gmsh::model::mesh::field::setNumbers(tag, option, api_value_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1883,7 +1883,7 @@ GMSH_API void gmshModelMeshFieldSetAsBackgroundMesh(const int tag, int * ierr) try { gmsh::model::mesh::field::setAsBackgroundMesh(tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1894,7 +1894,7 @@ GMSH_API void gmshModelMeshFieldSetAsBoundaryLayer(const int tag, int * ierr) try { gmsh::model::mesh::field::setAsBoundaryLayer(tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -1906,7 +1906,7 @@ GMSH_API int gmshModelGeoAddPoint(const double x, const double y, const double z try { result_api_ = gmsh::model::geo::addPoint(x, y, z, meshSize, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -1919,7 +1919,7 @@ GMSH_API int gmshModelGeoAddLine(const int startTag, const int endTag, const int try { result_api_ = gmsh::model::geo::addLine(startTag, endTag, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -1932,7 +1932,7 @@ GMSH_API int gmshModelGeoAddCircleArc(const int startTag, const int centerTag, c try { result_api_ = gmsh::model::geo::addCircleArc(startTag, centerTag, endTag, tag, nx, ny, nz); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -1945,7 +1945,7 @@ GMSH_API int gmshModelGeoAddEllipseArc(const int startTag, const int centerTag, try { result_api_ = gmsh::model::geo::addEllipseArc(startTag, centerTag, majorTag, endTag, tag, nx, ny, nz); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -1959,7 +1959,7 @@ GMSH_API int gmshModelGeoAddSpline(int * pointTags, size_t pointTags_n, const in std::vector<int> api_pointTags_(pointTags, pointTags + pointTags_n); result_api_ = gmsh::model::geo::addSpline(api_pointTags_, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -1973,7 +1973,7 @@ GMSH_API int gmshModelGeoAddBSpline(int * pointTags, size_t pointTags_n, const i std::vector<int> api_pointTags_(pointTags, pointTags + pointTags_n); result_api_ = gmsh::model::geo::addBSpline(api_pointTags_, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -1987,7 +1987,7 @@ GMSH_API int gmshModelGeoAddBezier(int * pointTags, size_t pointTags_n, const in std::vector<int> api_pointTags_(pointTags, pointTags + pointTags_n); result_api_ = gmsh::model::geo::addBezier(api_pointTags_, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2001,7 +2001,7 @@ GMSH_API int gmshModelGeoAddPolyline(int * pointTags, size_t pointTags_n, const std::vector<int> api_pointTags_(pointTags, pointTags + pointTags_n); result_api_ = gmsh::model::geo::addPolyline(api_pointTags_, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2015,7 +2015,7 @@ GMSH_API int gmshModelGeoAddCompoundSpline(int * curveTags, size_t curveTags_n, std::vector<int> api_curveTags_(curveTags, curveTags + curveTags_n); result_api_ = gmsh::model::geo::addCompoundSpline(api_curveTags_, numIntervals, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2029,7 +2029,7 @@ GMSH_API int gmshModelGeoAddCompoundBSpline(int * curveTags, size_t curveTags_n, std::vector<int> api_curveTags_(curveTags, curveTags + curveTags_n); result_api_ = gmsh::model::geo::addCompoundBSpline(api_curveTags_, numIntervals, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2043,7 +2043,7 @@ GMSH_API int gmshModelGeoAddCurveLoop(int * curveTags, size_t curveTags_n, const std::vector<int> api_curveTags_(curveTags, curveTags + curveTags_n); result_api_ = gmsh::model::geo::addCurveLoop(api_curveTags_, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2057,7 +2057,7 @@ GMSH_API int gmshModelGeoAddPlaneSurface(int * wireTags, size_t wireTags_n, cons std::vector<int> api_wireTags_(wireTags, wireTags + wireTags_n); result_api_ = gmsh::model::geo::addPlaneSurface(api_wireTags_, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2071,7 +2071,7 @@ GMSH_API int gmshModelGeoAddSurfaceFilling(int * wireTags, size_t wireTags_n, co std::vector<int> api_wireTags_(wireTags, wireTags + wireTags_n); result_api_ = gmsh::model::geo::addSurfaceFilling(api_wireTags_, tag, sphereCenterTag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2085,7 +2085,7 @@ GMSH_API int gmshModelGeoAddSurfaceLoop(int * surfaceTags, size_t surfaceTags_n, std::vector<int> api_surfaceTags_(surfaceTags, surfaceTags + surfaceTags_n); result_api_ = gmsh::model::geo::addSurfaceLoop(api_surfaceTags_, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2099,7 +2099,7 @@ GMSH_API int gmshModelGeoAddVolume(int * shellTags, size_t shellTags_n, const in std::vector<int> api_shellTags_(shellTags, shellTags + shellTags_n); result_api_ = gmsh::model::geo::addVolume(api_shellTags_, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2120,7 +2120,7 @@ GMSH_API void gmshModelGeoExtrude(int * dimTags, size_t dimTags_n, const double gmsh::model::geo::extrude(api_dimTags_, dx, dy, dz, api_outDimTags_, api_numElements_, api_heights_, recombine); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2140,7 +2140,7 @@ GMSH_API void gmshModelGeoRevolve(int * dimTags, size_t dimTags_n, const double gmsh::model::geo::revolve(api_dimTags_, x, y, z, ax, ay, az, angle, api_outDimTags_, api_numElements_, api_heights_, recombine); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2160,7 +2160,7 @@ GMSH_API void gmshModelGeoTwist(int * dimTags, size_t dimTags_n, const double x, gmsh::model::geo::twist(api_dimTags_, x, y, z, dx, dy, dz, ax, ay, az, angle, api_outDimTags_, api_numElements_, api_heights_, recombine); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2176,7 +2176,7 @@ GMSH_API void gmshModelGeoTranslate(int * dimTags, size_t dimTags_n, const doubl } gmsh::model::geo::translate(api_dimTags_, dx, dy, dz); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2192,7 +2192,7 @@ GMSH_API void gmshModelGeoRotate(int * dimTags, size_t dimTags_n, const double x } gmsh::model::geo::rotate(api_dimTags_, x, y, z, ax, ay, az, angle); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2208,7 +2208,7 @@ GMSH_API void gmshModelGeoDilate(int * dimTags, size_t dimTags_n, const double x } gmsh::model::geo::dilate(api_dimTags_, x, y, z, a, b, c); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2224,7 +2224,7 @@ GMSH_API void gmshModelGeoMirror(int * dimTags, size_t dimTags_n, const double a } gmsh::model::geo::mirror(api_dimTags_, a, b, c, d); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2240,7 +2240,7 @@ GMSH_API void gmshModelGeoSymmetrize(int * dimTags, size_t dimTags_n, const doub } gmsh::model::geo::symmetrize(api_dimTags_, a, b, c, d); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2258,7 +2258,7 @@ GMSH_API void gmshModelGeoCopy(int * dimTags, size_t dimTags_n, int ** outDimTag gmsh::model::geo::copy(api_dimTags_, api_outDimTags_); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2274,7 +2274,7 @@ GMSH_API void gmshModelGeoRemove(int * dimTags, size_t dimTags_n, const int recu } gmsh::model::geo::remove(api_dimTags_, recursive); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2285,7 +2285,7 @@ GMSH_API void gmshModelGeoRemoveAllDuplicates(int * ierr) try { gmsh::model::geo::removeAllDuplicates(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2299,7 +2299,7 @@ GMSH_API void gmshModelGeoSplitCurve(const int tag, int * pointTags, size_t poin gmsh::model::geo::splitCurve(tag, api_pointTags_, api_curveTags_); vector2ptr(api_curveTags_, curveTags, curveTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2311,7 +2311,7 @@ GMSH_API int gmshModelGeoGetMaxTag(const int dim, int * ierr) try { result_api_ = gmsh::model::geo::getMaxTag(dim); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2323,7 +2323,7 @@ GMSH_API void gmshModelGeoSetMaxTag(const int dim, const int maxTag, int * ierr) try { gmsh::model::geo::setMaxTag(dim, maxTag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2334,7 +2334,7 @@ GMSH_API void gmshModelGeoSynchronize(int * ierr) try { gmsh::model::geo::synchronize(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2350,7 +2350,7 @@ GMSH_API void gmshModelGeoMeshSetSize(int * dimTags, size_t dimTags_n, const dou } gmsh::model::geo::mesh::setSize(api_dimTags_, size); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2361,7 +2361,7 @@ GMSH_API void gmshModelGeoMeshSetTransfiniteCurve(const int tag, const int nPoin try { gmsh::model::geo::mesh::setTransfiniteCurve(tag, nPoints, meshType, coef); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2373,7 +2373,7 @@ GMSH_API void gmshModelGeoMeshSetTransfiniteSurface(const int tag, const char * std::vector<int> api_cornerTags_(cornerTags, cornerTags + cornerTags_n); gmsh::model::geo::mesh::setTransfiniteSurface(tag, arrangement, api_cornerTags_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2385,7 +2385,7 @@ GMSH_API void gmshModelGeoMeshSetTransfiniteVolume(const int tag, int * cornerTa std::vector<int> api_cornerTags_(cornerTags, cornerTags + cornerTags_n); gmsh::model::geo::mesh::setTransfiniteVolume(tag, api_cornerTags_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2396,7 +2396,7 @@ GMSH_API void gmshModelGeoMeshSetRecombine(const int dim, const int tag, const d try { gmsh::model::geo::mesh::setRecombine(dim, tag, angle); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2407,7 +2407,7 @@ GMSH_API void gmshModelGeoMeshSetSmoothing(const int dim, const int tag, const i try { gmsh::model::geo::mesh::setSmoothing(dim, tag, val); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2418,7 +2418,7 @@ GMSH_API void gmshModelGeoMeshSetReverse(const int dim, const int tag, const int try { gmsh::model::geo::mesh::setReverse(dim, tag, val); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2429,7 +2429,7 @@ GMSH_API void gmshModelGeoMeshSetAlgorithm(const int dim, const int tag, const i try { gmsh::model::geo::mesh::setAlgorithm(dim, tag, val); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2440,7 +2440,7 @@ GMSH_API void gmshModelGeoMeshSetSizeFromBoundary(const int dim, const int tag, try { gmsh::model::geo::mesh::setSizeFromBoundary(dim, tag, val); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2452,7 +2452,7 @@ GMSH_API int gmshModelOccAddPoint(const double x, const double y, const double z try { result_api_ = gmsh::model::occ::addPoint(x, y, z, meshSize, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2465,7 +2465,7 @@ GMSH_API int gmshModelOccAddLine(const int startTag, const int endTag, const int try { result_api_ = gmsh::model::occ::addLine(startTag, endTag, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2478,7 +2478,7 @@ GMSH_API int gmshModelOccAddCircleArc(const int startTag, const int centerTag, c try { result_api_ = gmsh::model::occ::addCircleArc(startTag, centerTag, endTag, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2491,7 +2491,7 @@ GMSH_API int gmshModelOccAddCircle(const double x, const double y, const double try { result_api_ = gmsh::model::occ::addCircle(x, y, z, r, tag, angle1, angle2); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2504,7 +2504,7 @@ GMSH_API int gmshModelOccAddEllipseArc(const int startTag, const int centerTag, try { result_api_ = gmsh::model::occ::addEllipseArc(startTag, centerTag, majorTag, endTag, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2517,7 +2517,7 @@ GMSH_API int gmshModelOccAddEllipse(const double x, const double y, const double try { result_api_ = gmsh::model::occ::addEllipse(x, y, z, r1, r2, tag, angle1, angle2); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2531,7 +2531,7 @@ GMSH_API int gmshModelOccAddSpline(int * pointTags, size_t pointTags_n, const in std::vector<int> api_pointTags_(pointTags, pointTags + pointTags_n); result_api_ = gmsh::model::occ::addSpline(api_pointTags_, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2548,7 +2548,7 @@ GMSH_API int gmshModelOccAddBSpline(int * pointTags, size_t pointTags_n, const i std::vector<int> api_multiplicities_(multiplicities, multiplicities + multiplicities_n); result_api_ = gmsh::model::occ::addBSpline(api_pointTags_, tag, degree, api_weights_, api_knots_, api_multiplicities_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2562,7 +2562,7 @@ GMSH_API int gmshModelOccAddBezier(int * pointTags, size_t pointTags_n, const in std::vector<int> api_pointTags_(pointTags, pointTags + pointTags_n); result_api_ = gmsh::model::occ::addBezier(api_pointTags_, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2576,7 +2576,7 @@ GMSH_API int gmshModelOccAddWire(int * curveTags, size_t curveTags_n, const int std::vector<int> api_curveTags_(curveTags, curveTags + curveTags_n); result_api_ = gmsh::model::occ::addWire(api_curveTags_, tag, checkClosed); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2590,7 +2590,7 @@ GMSH_API int gmshModelOccAddCurveLoop(int * curveTags, size_t curveTags_n, const std::vector<int> api_curveTags_(curveTags, curveTags + curveTags_n); result_api_ = gmsh::model::occ::addCurveLoop(api_curveTags_, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2603,7 +2603,7 @@ GMSH_API int gmshModelOccAddRectangle(const double x, const double y, const doub try { result_api_ = gmsh::model::occ::addRectangle(x, y, z, dx, dy, tag, roundedRadius); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2616,7 +2616,7 @@ GMSH_API int gmshModelOccAddDisk(const double xc, const double yc, const double try { result_api_ = gmsh::model::occ::addDisk(xc, yc, zc, rx, ry, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2630,7 +2630,7 @@ GMSH_API int gmshModelOccAddPlaneSurface(int * wireTags, size_t wireTags_n, cons std::vector<int> api_wireTags_(wireTags, wireTags + wireTags_n); result_api_ = gmsh::model::occ::addPlaneSurface(api_wireTags_, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2644,7 +2644,7 @@ GMSH_API int gmshModelOccAddSurfaceFilling(const int wireTag, const int tag, int std::vector<int> api_pointTags_(pointTags, pointTags + pointTags_n); result_api_ = gmsh::model::occ::addSurfaceFilling(wireTag, tag, api_pointTags_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2657,7 +2657,7 @@ GMSH_API int gmshModelOccAddBSplineFilling(const int wireTag, const int tag, con try { result_api_ = gmsh::model::occ::addBSplineFilling(wireTag, tag, type); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2670,7 +2670,7 @@ GMSH_API int gmshModelOccAddBezierFilling(const int wireTag, const int tag, cons try { result_api_ = gmsh::model::occ::addBezierFilling(wireTag, tag, type); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2689,7 +2689,7 @@ GMSH_API int gmshModelOccAddBSplineSurface(int * pointTags, size_t pointTags_n, std::vector<int> api_multiplicitiesV_(multiplicitiesV, multiplicitiesV + multiplicitiesV_n); result_api_ = gmsh::model::occ::addBSplineSurface(api_pointTags_, numPointsU, tag, degreeU, degreeV, api_weights_, api_knotsU_, api_knotsV_, api_multiplicitiesU_, api_multiplicitiesV_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2703,7 +2703,7 @@ GMSH_API int gmshModelOccAddBezierSurface(int * pointTags, size_t pointTags_n, c std::vector<int> api_pointTags_(pointTags, pointTags + pointTags_n); result_api_ = gmsh::model::occ::addBezierSurface(api_pointTags_, numPointsU, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2717,7 +2717,7 @@ GMSH_API int gmshModelOccAddSurfaceLoop(int * surfaceTags, size_t surfaceTags_n, std::vector<int> api_surfaceTags_(surfaceTags, surfaceTags + surfaceTags_n); result_api_ = gmsh::model::occ::addSurfaceLoop(api_surfaceTags_, tag, sewing); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2731,7 +2731,7 @@ GMSH_API int gmshModelOccAddVolume(int * shellTags, size_t shellTags_n, const in std::vector<int> api_shellTags_(shellTags, shellTags + shellTags_n); result_api_ = gmsh::model::occ::addVolume(api_shellTags_, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2744,7 +2744,7 @@ GMSH_API int gmshModelOccAddSphere(const double xc, const double yc, const doubl try { result_api_ = gmsh::model::occ::addSphere(xc, yc, zc, radius, tag, angle1, angle2, angle3); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2757,7 +2757,7 @@ GMSH_API int gmshModelOccAddBox(const double x, const double y, const double z, try { result_api_ = gmsh::model::occ::addBox(x, y, z, dx, dy, dz, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2770,7 +2770,7 @@ GMSH_API int gmshModelOccAddCylinder(const double x, const double y, const doubl try { result_api_ = gmsh::model::occ::addCylinder(x, y, z, dx, dy, dz, r, tag, angle); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2783,7 +2783,7 @@ GMSH_API int gmshModelOccAddCone(const double x, const double y, const double z, try { result_api_ = gmsh::model::occ::addCone(x, y, z, dx, dy, dz, r1, r2, tag, angle); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2796,7 +2796,7 @@ GMSH_API int gmshModelOccAddWedge(const double x, const double y, const double z try { result_api_ = gmsh::model::occ::addWedge(x, y, z, dx, dy, dz, tag, ltx); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2809,7 +2809,7 @@ GMSH_API int gmshModelOccAddTorus(const double x, const double y, const double z try { result_api_ = gmsh::model::occ::addTorus(x, y, z, r1, r2, tag, angle); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -2824,7 +2824,7 @@ GMSH_API void gmshModelOccAddThruSections(int * wireTags, size_t wireTags_n, int gmsh::model::occ::addThruSections(api_wireTags_, api_outDimTags_, tag, makeSolid, makeRuled, maxDegree); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2838,7 +2838,7 @@ GMSH_API void gmshModelOccAddThickSolid(const int volumeTag, int * excludeSurfac gmsh::model::occ::addThickSolid(volumeTag, api_excludeSurfaceTags_, offset, api_outDimTags_, tag); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2858,7 +2858,7 @@ GMSH_API void gmshModelOccExtrude(int * dimTags, size_t dimTags_n, const double gmsh::model::occ::extrude(api_dimTags_, dx, dy, dz, api_outDimTags_, api_numElements_, api_heights_, recombine); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2878,7 +2878,7 @@ GMSH_API void gmshModelOccRevolve(int * dimTags, size_t dimTags_n, const double gmsh::model::occ::revolve(api_dimTags_, x, y, z, ax, ay, az, angle, api_outDimTags_, api_numElements_, api_heights_, recombine); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2896,7 +2896,7 @@ GMSH_API void gmshModelOccAddPipe(int * dimTags, size_t dimTags_n, const int wir gmsh::model::occ::addPipe(api_dimTags_, wireTag, api_outDimTags_); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2912,7 +2912,7 @@ GMSH_API void gmshModelOccFillet(int * volumeTags, size_t volumeTags_n, int * cu gmsh::model::occ::fillet(api_volumeTags_, api_curveTags_, api_radii_, api_outDimTags_, removeVolume); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2929,7 +2929,7 @@ GMSH_API void gmshModelOccChamfer(int * volumeTags, size_t volumeTags_n, int * c gmsh::model::occ::chamfer(api_volumeTags_, api_curveTags_, api_surfaceTags_, api_distances_, api_outDimTags_, removeVolume); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2954,7 +2954,7 @@ GMSH_API void gmshModelOccFuse(int * objectDimTags, size_t objectDimTags_n, int vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); vectorvectorpair2intptrptr(api_outDimTagsMap_, outDimTagsMap, outDimTagsMap_n, outDimTagsMap_nn); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -2979,7 +2979,7 @@ GMSH_API void gmshModelOccIntersect(int * objectDimTags, size_t objectDimTags_n, vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); vectorvectorpair2intptrptr(api_outDimTagsMap_, outDimTagsMap, outDimTagsMap_n, outDimTagsMap_nn); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3004,7 +3004,7 @@ GMSH_API void gmshModelOccCut(int * objectDimTags, size_t objectDimTags_n, int * vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); vectorvectorpair2intptrptr(api_outDimTagsMap_, outDimTagsMap, outDimTagsMap_n, outDimTagsMap_nn); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3029,7 +3029,7 @@ GMSH_API void gmshModelOccFragment(int * objectDimTags, size_t objectDimTags_n, vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); vectorvectorpair2intptrptr(api_outDimTagsMap_, outDimTagsMap, outDimTagsMap_n, outDimTagsMap_nn); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3045,7 +3045,7 @@ GMSH_API void gmshModelOccTranslate(int * dimTags, size_t dimTags_n, const doubl } gmsh::model::occ::translate(api_dimTags_, dx, dy, dz); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3061,7 +3061,7 @@ GMSH_API void gmshModelOccRotate(int * dimTags, size_t dimTags_n, const double x } gmsh::model::occ::rotate(api_dimTags_, x, y, z, ax, ay, az, angle); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3077,7 +3077,7 @@ GMSH_API void gmshModelOccDilate(int * dimTags, size_t dimTags_n, const double x } gmsh::model::occ::dilate(api_dimTags_, x, y, z, a, b, c); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3093,7 +3093,7 @@ GMSH_API void gmshModelOccMirror(int * dimTags, size_t dimTags_n, const double a } gmsh::model::occ::mirror(api_dimTags_, a, b, c, d); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3109,7 +3109,7 @@ GMSH_API void gmshModelOccSymmetrize(int * dimTags, size_t dimTags_n, const doub } gmsh::model::occ::symmetrize(api_dimTags_, a, b, c, d); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3126,7 +3126,7 @@ GMSH_API void gmshModelOccAffineTransform(int * dimTags, size_t dimTags_n, doubl std::vector<double> api_a_(a, a + a_n); gmsh::model::occ::affineTransform(api_dimTags_, api_a_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3144,7 +3144,7 @@ GMSH_API void gmshModelOccCopy(int * dimTags, size_t dimTags_n, int ** outDimTag gmsh::model::occ::copy(api_dimTags_, api_outDimTags_); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3160,7 +3160,7 @@ GMSH_API void gmshModelOccRemove(int * dimTags, size_t dimTags_n, const int recu } gmsh::model::occ::remove(api_dimTags_, recursive); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3171,7 +3171,7 @@ GMSH_API void gmshModelOccRemoveAllDuplicates(int * ierr) try { gmsh::model::occ::removeAllDuplicates(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3189,7 +3189,7 @@ GMSH_API void gmshModelOccHealShapes(int ** outDimTags, size_t * outDimTags_n, i gmsh::model::occ::healShapes(api_outDimTags_, api_dimTags_, tolerance, fixDegenerated, fixSmallEdges, fixSmallFaces, sewFaces, makeSolids); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3202,7 +3202,7 @@ GMSH_API void gmshModelOccImportShapes(const char * fileName, int ** outDimTags, gmsh::model::occ::importShapes(fileName, api_outDimTags_, highestDimOnly, format); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3215,7 +3215,7 @@ GMSH_API void gmshModelOccImportShapesNativePointer(const void * shape, int ** o gmsh::model::occ::importShapesNativePointer(shape, api_outDimTags_, highestDimOnly); vectorpair2intptr(api_outDimTags_, outDimTags, outDimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3228,7 +3228,7 @@ GMSH_API void gmshModelOccGetEntities(int ** dimTags, size_t * dimTags_n, const gmsh::model::occ::getEntities(api_dimTags_, dim); vectorpair2intptr(api_dimTags_, dimTags, dimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3241,7 +3241,7 @@ GMSH_API void gmshModelOccGetEntitiesInBoundingBox(const double xmin, const doub gmsh::model::occ::getEntitiesInBoundingBox(xmin, ymin, zmin, xmax, ymax, zmax, api_tags_, dim); vectorpair2intptr(api_tags_, tags, tags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3252,7 +3252,7 @@ GMSH_API void gmshModelOccGetBoundingBox(const int dim, const int tag, double * try { gmsh::model::occ::getBoundingBox(dim, tag, *xmin, *ymin, *zmin, *xmax, *ymax, *zmax); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3263,7 +3263,7 @@ GMSH_API void gmshModelOccGetMass(const int dim, const int tag, double * mass, i try { gmsh::model::occ::getMass(dim, tag, *mass); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3274,7 +3274,7 @@ GMSH_API void gmshModelOccGetCenterOfMass(const int dim, const int tag, double * try { gmsh::model::occ::getCenterOfMass(dim, tag, *x, *y, *z); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3287,7 +3287,7 @@ GMSH_API void gmshModelOccGetMatrixOfInertia(const int dim, const int tag, doubl gmsh::model::occ::getMatrixOfInertia(dim, tag, api_mat_); vector2ptr(api_mat_, mat, mat_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3299,7 +3299,7 @@ GMSH_API int gmshModelOccGetMaxTag(const int dim, int * ierr) try { result_api_ = gmsh::model::occ::getMaxTag(dim); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -3311,7 +3311,7 @@ GMSH_API void gmshModelOccSetMaxTag(const int dim, const int maxTag, int * ierr) try { gmsh::model::occ::setMaxTag(dim, maxTag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3322,7 +3322,7 @@ GMSH_API void gmshModelOccSynchronize(int * ierr) try { gmsh::model::occ::synchronize(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3338,7 +3338,7 @@ GMSH_API void gmshModelOccMeshSetSize(int * dimTags, size_t dimTags_n, const dou } gmsh::model::occ::mesh::setSize(api_dimTags_, size); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3350,7 +3350,7 @@ GMSH_API int gmshViewAdd(const char * name, const int tag, int * ierr) try { result_api_ = gmsh::view::add(name, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -3362,7 +3362,7 @@ GMSH_API void gmshViewRemove(const int tag, int * ierr) try { gmsh::view::remove(tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3374,7 +3374,7 @@ GMSH_API int gmshViewGetIndex(const int tag, int * ierr) try { result_api_ = gmsh::view::getIndex(tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -3388,7 +3388,7 @@ GMSH_API void gmshViewGetTags(int ** tags, size_t * tags_n, int * ierr) gmsh::view::getTags(api_tags_); vector2ptr(api_tags_, tags, tags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3403,7 +3403,7 @@ GMSH_API void gmshViewAddModelData(const int tag, const int step, const char * m api_data_[i] = std::vector<double>(data[i], data[i] + data_n[i]); gmsh::view::addModelData(tag, step, modelName, dataType, api_tags_, api_data_, time, numComponents, partition); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3416,7 +3416,7 @@ GMSH_API void gmshViewAddHomogeneousModelData(const int tag, const int step, con std::vector<double> api_data_(data, data + data_n); gmsh::view::addHomogeneousModelData(tag, step, modelName, dataType, api_tags_, api_data_, time, numComponents, partition); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3433,7 +3433,7 @@ GMSH_API void gmshViewGetHomogeneousModelData(const int tag, const int step, cha vector2ptr(api_tags_, tags, tags_n); vector2ptr(api_data_, data, data_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3445,7 +3445,7 @@ GMSH_API void gmshViewAddListData(const int tag, const char * dataType, const in std::vector<double> api_data_(data, data + data_n); gmsh::view::addListData(tag, dataType, numEle, api_data_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3462,7 +3462,7 @@ GMSH_API void gmshViewGetListData(const int tag, char *** dataType, size_t * dat vector2ptr(api_numElements_, numElements, numElements_n); vectorvector2ptrptr(api_data_, data, data_n, data_nn); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3476,7 +3476,7 @@ GMSH_API void gmshViewAddListDataString(const int tag, double * coord, size_t co std::vector<std::string> api_style_(style, style + style_n); gmsh::view::addListDataString(tag, api_coord_, api_data_, api_style_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3493,7 +3493,7 @@ GMSH_API void gmshViewGetListDataStrings(const int tag, const int dim, double ** vectorstring2charptrptr(api_data_, data, data_n); vectorstring2charptrptr(api_style_, style, style_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3508,7 +3508,7 @@ GMSH_API void gmshViewSetInterpolationMatrices(const int tag, const char * type, std::vector<double> api_expGeo_(expGeo, expGeo + expGeo_n); gmsh::view::setInterpolationMatrices(tag, type, d, api_coef_, api_exp_, dGeo, api_coefGeo_, api_expGeo_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3520,7 +3520,7 @@ GMSH_API int gmshViewAddAlias(const int refTag, const int copyOptions, const int try { result_api_ = gmsh::view::addAlias(refTag, copyOptions, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -3532,7 +3532,7 @@ GMSH_API void gmshViewCopyOptions(const int refTag, const int tag, int * ierr) try { gmsh::view::copyOptions(refTag, tag); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3543,7 +3543,7 @@ GMSH_API void gmshViewCombine(const char * what, const char * how, const int rem try { gmsh::view::combine(what, how, remove, copyOptions); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3559,7 +3559,7 @@ GMSH_API void gmshViewProbe(const int tag, const double x, const double y, const gmsh::view::probe(tag, x, y, z, api_value_, step, numComp, gradient, tolerance, api_xElemCoord_, api_yElemCoord_, api_zElemCoord_); vector2ptr(api_value_, value, value_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3570,7 +3570,7 @@ GMSH_API void gmshViewWrite(const int tag, const char * fileName, const int appe try { gmsh::view::write(tag, fileName, append); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3581,7 +3581,7 @@ GMSH_API void gmshPluginSetNumber(const char * name, const char * option, const try { gmsh::plugin::setNumber(name, option, value); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3592,7 +3592,7 @@ GMSH_API void gmshPluginSetString(const char * name, const char * option, const try { gmsh::plugin::setString(name, option, value); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3603,7 +3603,7 @@ GMSH_API void gmshPluginRun(const char * name, int * ierr) try { gmsh::plugin::run(name); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3614,7 +3614,7 @@ GMSH_API void gmshGraphicsDraw(int * ierr) try { gmsh::graphics::draw(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3625,7 +3625,7 @@ GMSH_API void gmshFltkInitialize(int * ierr) try { gmsh::fltk::initialize(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3636,7 +3636,7 @@ GMSH_API void gmshFltkWait(const double time, int * ierr) try { gmsh::fltk::wait(time); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3647,7 +3647,7 @@ GMSH_API void gmshFltkUpdate(int * ierr) try { gmsh::fltk::update(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3658,7 +3658,7 @@ GMSH_API void gmshFltkAwake(const char * action, int * ierr) try { gmsh::fltk::awake(action); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3669,7 +3669,7 @@ GMSH_API void gmshFltkLock(int * ierr) try { gmsh::fltk::lock(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3680,7 +3680,7 @@ GMSH_API void gmshFltkUnlock(int * ierr) try { gmsh::fltk::unlock(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3691,7 +3691,7 @@ GMSH_API void gmshFltkRun(int * ierr) try { gmsh::fltk::run(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3703,7 +3703,7 @@ GMSH_API int gmshFltkIsAvailable(int * ierr) try { result_api_ = gmsh::fltk::isAvailable(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -3718,7 +3718,7 @@ GMSH_API int gmshFltkSelectEntities(int ** dimTags, size_t * dimTags_n, const in result_api_ = gmsh::fltk::selectEntities(api_dimTags_, dim); vectorpair2intptr(api_dimTags_, dimTags, dimTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -3733,7 +3733,7 @@ GMSH_API int gmshFltkSelectElements(size_t ** elementTags, size_t * elementTags_ result_api_ = gmsh::fltk::selectElements(api_elementTags_); vector2ptr(api_elementTags_, elementTags, elementTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -3748,7 +3748,7 @@ GMSH_API int gmshFltkSelectViews(int ** viewTags, size_t * viewTags_n, int * ier result_api_ = gmsh::fltk::selectViews(api_viewTags_); vector2ptr(api_viewTags_, viewTags, viewTags_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -3760,7 +3760,7 @@ GMSH_API void gmshOnelabSet(const char * data, const char * format, int * ierr) try { gmsh::onelab::set(data, format); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3773,7 +3773,7 @@ GMSH_API void gmshOnelabGet(char ** data, const char * name, const char * format gmsh::onelab::get(api_data_, name, format); *data = strdup(api_data_.c_str()); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3785,7 +3785,7 @@ GMSH_API void gmshOnelabSetNumber(const char * name, double * value, size_t valu std::vector<double> api_value_(value, value + value_n); gmsh::onelab::setNumber(name, api_value_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3797,7 +3797,7 @@ GMSH_API void gmshOnelabSetString(const char * name, char ** value, size_t value std::vector<std::string> api_value_(value, value + value_n); gmsh::onelab::setString(name, api_value_); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3810,7 +3810,7 @@ GMSH_API void gmshOnelabGetNumber(const char * name, double ** value, size_t * v gmsh::onelab::getNumber(name, api_value_); vector2ptr(api_value_, value, value_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3823,7 +3823,7 @@ GMSH_API void gmshOnelabGetString(const char * name, char *** value, size_t * va gmsh::onelab::getString(name, api_value_); vectorstring2charptrptr(api_value_, value, value_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3834,7 +3834,7 @@ GMSH_API void gmshOnelabClear(const char * name, int * ierr) try { gmsh::onelab::clear(name); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3845,7 +3845,7 @@ GMSH_API void gmshOnelabRun(const char * name, const char * command, int * ierr) try { gmsh::onelab::run(name, command); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3856,7 +3856,7 @@ GMSH_API void gmshLoggerWrite(const char * message, const char * level, int * ie try { gmsh::logger::write(message, level); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3867,7 +3867,7 @@ GMSH_API void gmshLoggerStart(int * ierr) try { gmsh::logger::start(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3880,7 +3880,7 @@ GMSH_API void gmshLoggerGet(char *** log, size_t * log_n, int * ierr) gmsh::logger::get(api_log_); vectorstring2charptrptr(api_log_, log, log_n); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3891,7 +3891,7 @@ GMSH_API void gmshLoggerStop(int * ierr) try { gmsh::logger::stop(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } @@ -3903,7 +3903,7 @@ GMSH_API double gmshLoggerGetWallTime(int * ierr) try { result_api_ = gmsh::logger::getWallTime(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -3916,7 +3916,7 @@ GMSH_API double gmshLoggerGetCpuTime(int * ierr) try { result_api_ = gmsh::logger::getCpuTime(); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } return result_api_; @@ -3930,7 +3930,7 @@ GMSH_API void gmshLoggerGetLastError(char ** error, int * ierr) gmsh::logger::getLastError(api_error_); *error = strdup(api_error_.c_str()); } - catch(const std::string &api_error_){ + catch(...){ if(ierr) *ierr = 1; } } -- GitLab