public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: Ross Johnson <rpj@ise.canberra.edu.au>
To: reentrant <reentrant@yahoo.com>
Cc: pthreads-win32@sourceware.cygnus.com
Subject: Re: catch (...)
Date: Tue, 07 Aug 2001 20:52:00 -0000	[thread overview]
Message-ID: <3B70B787.948CE5E8@ise.canberra.edu.au> (raw)
In-Reply-To: <20010807154926.5288.qmail@web12305.mail.yahoo.com>

reentrant wrote:
> 
> > #define PtW32CatchAll \
> >         catch( ptw32_exception & ) { throw; } \
> >         catch( ... )
> 
> Seems like it might be more appropriate (possibly required by the pthread
> standard?) for this to have a prefix of "pthread_" and a suffix of "_np" for
> non-portable; potentially "pthread_w32_catch_all_np" or similar instead of
>  ?  The same holds true for other PtW32 prefixed items.  It
> seems wrong to introduce another namespace.
> 

You are probably right. If I recall correctly, it was
given a Win32 style name because it is Win32 specific
AND specific to MSVC++. Another weak argument for not putting
it into the _np namespace is that it's a macro standing
in for a compiler keyword rather than imitating a function.

Anyway, changing it now would require people to change their
code.

It can be used portably as follows:

#ifdef PtW32CatchAll
	PtW32CatchAll
#else
	catch(...)
#endif
	{
		// Exception handler of last resort
	}


Or avoid all of this added complexity if you can by using
the plain vanilla C version of the library named pthreadVC.dll
which doesn't use exceptions internally.

Ross

      reply	other threads:[~2001-08-07 20:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-31 14:31 critical section Ye Liu
2001-07-31 15:22 ` Scott McCaskill
2001-07-31 15:39   ` Ye Liu
2001-07-31 15:52     ` Scott McCaskill
2001-08-05 21:31       ` catch (...) Ye Liu
2001-08-05 22:07         ` Scott McCaskill
2001-08-05 22:12           ` Ye Liu
2001-08-06 20:38           ` Ross Johnson
2001-08-07  8:49             ` reentrant
2001-08-07 20:52               ` Ross Johnson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B70B787.948CE5E8@ise.canberra.edu.au \
    --to=rpj@ise.canberra.edu.au \
    --cc=pthreads-win32@sourceware.cygnus.com \
    --cc=reentrant@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).