From: bangerth Date: Sun, 30 Jul 2006 22:29:00 +0000 (+0000) Subject: Transport the exact error code of pthread_create into the exception in case it fails X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6aa48eec03976b38e87c6a2bd1764d81a4505e40;p=dealii-svn.git Transport the exact error code of pthread_create into the exception in case it fails git-svn-id: https://svn.dealii.org/trunk@13528 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/thread_management.h b/deal.II/base/include/base/thread_management.h index 6461a7b904..86a2fe998c 100644 --- a/deal.II/base/include/base/thread_management.h +++ b/deal.II/base/include/base/thread_management.h @@ -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 diff --git a/deal.II/base/source/thread_management.cc b/deal.II/base/source/thread_management.cc index 8a4181f038..735dbd3654 100644 --- a/deal.II/base/source/thread_management.cc +++ b/deal.II/base/source/thread_management.cc @@ -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 - namespace Threads { namespace internal @@ -364,7 +363,8 @@ namespace Threads } while (error == EAGAIN); - AssertThrow (error == 0, ExcInternalError()); + AssertThrow (error == 0, + ExcThreadCreationError(error)); }