[Dune] abort()

Christian Engwer christi at uni-hd.de
Fri Jul 21 11:08:56 CEST 2006


Hi,

I just found some places in dune where the method abort() is used to
stop after an error.

I' m wandering what the intention for using abort was. Usually I would
consider abort() a bad choice for several reasons:
1) abort will tell the system to write a core dump.
   This isn't always what you want, especially if you are runnign on a
   cluster and handle huge amounts of data.
2) There is no immediate way to see the line of the error.
3) I would prefer DUNE_THROW, because in this case the application
   writer can decide what is the best way to gracefully shut down the
   process. Also DUNE_THROW offers a nice way to enrich the error
   message with __file__ and __line__

If there is a special reason for not using DUNE_THROW in these places
I would be glad to learn about this. Otherwise I suggest to change
these lines.

You can find the list of abort statements in dune attached.

CU Christian

-------------- next part --------------
./dune-common/common/misc.hh:118:        abort();
dune-grid/grid/albertagrid/albertagrid.cc:4309:  abort();
dune-grid/grid/albertagrid/albertaextra.hh:952:    abort();
dune-grid/grid/albertagrid/agelementindex.cc:111:  abort();
dune-grid/grid/common/indexstack.hh:68:    abort();
dune-grid/grid/io/file/dgfparser/dgfug.cc:18:      abort();
dune-grid/grid/io/file/dgfparser/dgfug.cc:46:    abort();
dune-grid/grid/io/file/dgfparser/dgfalberta.cc:18:      abort();
dune-grid/grid/io/file/dgfparser/dgfyasp.cc:14:    abort();
dune-grid/grid/io/file/dgfparser/dgfyasp.cc:22:    abort();
dune-grid/grid/io/file/dgfparser/dgfyasp.cc:35:    abort();
dune-grid/grid/io/file/dgfparser/dgfparsers.cc:13:    abort();
dune-grid/grid/io/file/dgfparser/dgfparsers.cc:21:    abort();
dune-grid/grid/io/file/dgfparser/dgfalu.cc:63:  abort();
dune-grid/grid/io/file/dgfparser/dgfalu.cc:88:  abort();
dune-grid/grid/io/file/dgfparser/dgfparser.cc:299:      abort();
dune-grid/grid/io/file/dgfparser/dgfparser.cc:342:      abort();
dune-grid/grid/io/file/dgfparser/dgfparser.cc:346:      abort();
dune-grid/grid/io/file/dgfparser/dgfparser.cc:452:    abort();
dune-grid/grid/io/file/dgfparser/dgfparser.cc:461:    abort();
dune-grid/grid/io/file/dgfparser/dgfparserblocks.hh:58:	abort();
dune-grid/grid/io/file/dgfparser/dgfparserblocks.hh:841:        abort();
dune-grid/grid/io/file/dgfparser/dgfparserblocks.hh:852:	  abort();
dune-grid/grid/io/file/dgfparser/dgfparserblocks.hh:873:	  abort();
dune-grid/grid/io/file/dgfparser/dgfs.cc:14:    abort();
dune-grid/grid/io/file/dgfparser/dgfs.cc:22:    abort();
dune-grid/grid/io/visual/grape/grapedatadisplay.cc:89:    abort();
dune-grid/grid/io/visual/grape/combinedgrapedisplay.cc:107:  abort () ;
dune-grid/grid/io/visual/grape/combinedgrapedisplay.cc:279:  abort();
dune-grid/grid/io/visual/grape/grapegriddisplay.cc:385:  abort () ;
dune-grid/grid/io/visual/grape/grapegriddisplay.cc:516:  abort();
dune-grid/grid/io/visual/grape/grapegriddisplay.cc:540:             abort(); 
dune-grid/grid/alugrid/2d/iterator.hh:124:  virtual void increment() { abort(); };
dune-grid/grid/alugrid/3d/indexsets.hh:423:            abort();
dune-grid/grid/alugrid/3d/indexsets.hh:430:            if( lesser == greater ) abort();
dune-grid/grid/alugrid/3d/grid_imp.cc:1153:        abort();
dune-grid/grid/alugrid/3d/faceutility_imp.cc:393:        abort();


More information about the Dune mailing list