From 6aa48eec03976b38e87c6a2bd1764d81a4505e40 Mon Sep 17 00:00:00 2001 From: bangerth Date: Sun, 30 Jul 2006 22:29:00 +0000 Subject: [PATCH] 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 --- deal.II/base/include/base/thread_management.h | 7 +++++++ deal.II/base/source/thread_management.cc | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) 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)); } -- 2.39.5