try block portability?
Derek Parnell
derek at nomail.afraid.org
Wed Mar 7 23:29:20 PST 2007
On Thu, 08 Mar 2007 15:17:45 +0800, Davidl at 126.com wrote:
> i've seen reactos hacker suffer from PSEH thingie.
> and they use a macro to implement PSEH try block.
> the PSEH try block would looks like
Huh? Can somebody translate that into English for me?
> _PSEH_TRY
> {
> ....
> }
> _PSEH_EXCEPT
> {
> ...
> }
> _PSEH_END
>
> this is a good idea since all try block code implemented
> in C. and it's more portable than
> try
> {
> }
> except
> {
> }
What is wrong with ...
try
{
... some code ...
}
catch
{
... oops! something went wrong, so handle it. ...
}
finally
{
... All is well, so deal with that ...
}
How does this not suit your needs?
Or is the 'scope' syntax better for you?
{
... some code ...
scope(failure) {... oops! something went wrong, so handle it. ...}
scope(success) {... All is well, so deal with that ...}
}
--
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Justice for David Hicks!"
8/03/2007 6:22:15 PM
More information about the Digitalmars-d
mailing list