@@ -181,8 +181,8 @@ namespace Hermes
181
181
// // vertices ////////////////////////////////////////////////////////////////
182
182
183
183
n = m.n_vert ;
184
- if (n < 0 ) throw Hermes::Exceptions::MeshLoadFailureException (" File %s: 'vertices' must be a list." , filename);
185
- if (n < 2 ) throw Hermes::Exceptions::MeshLoadFailureException (" File %s: invalid number of vertices." , filename);
184
+ if (n < 0 ) throw Hermes::Exceptions::MeshLoadFailureException (" File %s: 'vertices' must be a list." , filename. c_str () );
185
+ if (n < 2 ) throw Hermes::Exceptions::MeshLoadFailureException (" File %s: invalid number of vertices." , filename. c_str () );
186
186
187
187
// create a hash table large enough
188
188
int size = HashTable::H2D_DEFAULT_HASH_SIZE;
@@ -207,8 +207,8 @@ namespace Hermes
207
207
// // elements ////////////////////////////////////////////////////////////////
208
208
209
209
n = m.n_el ;
210
- if (n < 0 ) throw Hermes::Exceptions::MeshLoadFailureException (" File %s: 'elements' must be a list." , filename);
211
- if (n < 1 ) throw Hermes::Exceptions::MeshLoadFailureException (" File %s: no elements defined." , filename);
210
+ if (n < 0 ) throw Hermes::Exceptions::MeshLoadFailureException (" File %s: 'elements' must be a list." , filename. c_str () );
211
+ if (n < 1 ) throw Hermes::Exceptions::MeshLoadFailureException (" File %s: no elements defined." , filename. c_str () );
212
212
213
213
// create elements
214
214
mesh->nactive = 0 ;
@@ -229,7 +229,7 @@ namespace Hermes
229
229
if (nv < 4 || nv > 5 )
230
230
{
231
231
delete[] idx;
232
- throw Hermes::Exceptions::MeshLoadFailureException (" File %s: element #%d: wrong number of vertex indices." , filename, i);
232
+ throw Hermes::Exceptions::MeshLoadFailureException (" File %s: element #%d: wrong number of vertex indices." , filename. c_str () , i);
233
233
}
234
234
235
235
if (nv == 4 ) {
@@ -251,7 +251,7 @@ namespace Hermes
251
251
if (idx[j] < 0 || idx[j] >= mesh->ntopvert )
252
252
{
253
253
delete[] idx;
254
- throw Hermes::Exceptions::MeshLoadFailureException (" File %s: error creating element #%d: vertex #%d does not exist." , filename, i, idx[j]);
254
+ throw Hermes::Exceptions::MeshLoadFailureException (" File %s: error creating element #%d: vertex #%d does not exist." , filename. c_str () , i, idx[j]);
255
255
}
256
256
257
257
Node *v0 = &mesh->nodes [idx[0 ]], *v1 = &mesh->nodes [idx[1 ]], *v2 = &mesh->nodes [idx[2 ]];
@@ -293,7 +293,7 @@ namespace Hermes
293
293
294
294
en = mesh->peek_edge_node (v1, v2);
295
295
if (en == nullptr )
296
- throw Hermes::Exceptions::MeshLoadFailureException (" File %s: boundary data #%d: edge %d-%d does not exist" , filename, i, v1, v2);
296
+ throw Hermes::Exceptions::MeshLoadFailureException (" File %s: boundary data #%d: edge %d-%d does not exist" , filename. c_str () , i, v1, v2);
297
297
298
298
std::string bnd_marker;
299
299
bnd_marker = m.bdy_type [i];
@@ -322,7 +322,7 @@ namespace Hermes
322
322
if (m.n_curv > 0 )
323
323
{
324
324
n = m.n_curv ;
325
- if (n < 0 ) throw Hermes::Exceptions::MeshLoadFailureException (" File %s: 'curves' must be a list." , filename);
325
+ if (n < 0 ) throw Hermes::Exceptions::MeshLoadFailureException (" File %s: 'curves' must be a list." , filename. c_str () );
326
326
327
327
// load curved edges
328
328
for (i = 0 ; i < n; i++)
@@ -351,7 +351,7 @@ namespace Hermes
351
351
if (m.n_ref > 0 )
352
352
{
353
353
n = m.n_ref ;
354
- if (n < 0 ) throw Hermes::Exceptions::MeshLoadFailureException (" File %s: 'refinements' must be a list." , filename);
354
+ if (n < 0 ) throw Hermes::Exceptions::MeshLoadFailureException (" File %s: 'refinements' must be a list." , filename. c_str () );
355
355
356
356
// perform initial refinements
357
357
for (i = 0 ; i < n; i++)
0 commit comments