]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve error message for GridIn::read_abaqus 3054/head
authorJean-Paul Pelteret <jppelteret@gmail.com>
Fri, 2 Sep 2016 12:38:34 +0000 (14:38 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Fri, 2 Sep 2016 12:48:30 +0000 (14:48 +0200)
To assist debugging, where possible the error thrown internally when the
UCD grid is created is now displayed before the terminal error message
is given.

source/grid/grid_in.cc

index 95d71d46c0ee8a2cd0b66336ee4b1182142211da..87a35b7b35c9d6e154c64e62a29654caffcabcc4 100644 (file)
@@ -867,6 +867,18 @@ void GridIn<dim, spacedim>::read_abaqus (std::istream
     {
       read_ucd(in_ucd, apply_all_indicators_to_manifolds);
     }
+  catch (std::exception &exc)
+    {
+      std::cerr
+          << "Exception on processing internal UCD data: " << std::endl
+          << exc.what()
+          << std::endl;
+
+      AssertThrow(false, ExcMessage("Internal conversion from ABAQUS file to UCD format was unsuccessful. \
+                                   More information is provided in an error message printed above. \
+                                   Are you sure that your ABAQUS mesh file conforms with the requirements \
+                                   listed in the documentation?"));
+    }
   catch (...)
     {
       AssertThrow(false, ExcMessage("Internal conversion from ABAQUS file to UCD format was unsuccessful. \

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.