]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Transport the exact error code of pthread_create into the exception in case it fails
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 30 Jul 2006 22:29:00 +0000 (22:29 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 30 Jul 2006 22:29:00 +0000 (22:29 +0000)
git-svn-id: https://svn.dealii.org/trunk@13528 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/thread_management.h
deal.II/base/source/thread_management.cc

index 6461a7b9041fc6359b306629e6cac8d9ef641c96..86a2fe998c4657164e7af205a0f33497653373b6 100644 (file)
@@ -2925,6 +2925,13 @@ namespace Threads
                                           * more than once.
                                           */
         void join () const;
+
+                                        /**
+                                         * Exception
+                                         */
+       DeclException1 (ExcThreadCreationError,
+                       int,
+                       << "pthread_create return code is " << arg1);
     };
 
 #  else       // some other threading model
index 8a4181f038fda701d8ce3953c107a23341465043..735dbd3654c8b6462b4e96a49ea478823c9ac088 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2000, 2001, 2002, 2003, 2005 by the deal.II authors
+//    Copyright (C) 2000, 2001, 2002, 2003, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -26,7 +26,6 @@
 #include <sys/errno.h>
 
 
-
 namespace Threads 
 {
   namespace internal
@@ -364,7 +363,8 @@ namespace Threads
         }
       while (error == EAGAIN);
 
-      AssertThrow (error == 0, ExcInternalError());
+      AssertThrow (error == 0,
+                  ExcThreadCreationError(error));
     }
       
     

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.