www.digitalmars.com         C & C++   DMDScript  

c++.windows.32-bits - _set_se_translator

reply Scott Dale Robison <scott-news.digitalmars.com isdr.net> writes:
In trying to handle structured exceptions along side c++ exceptions, 
I've discovered the _set_se_translator from the VC++ RTL. Long story short:

1. Is there an equivalent means of mapping SE to C++E in DMC++?

2. If not, is it on the wish list?

3. If not, please add it to the wish list. :)

Thanks muchly for your time.

SDR
Apr 28 2003
parent reply "Walter" <walter digitalmars.com> writes:
The structured exception handling constructs __try, __except, and __finally
work in DMC++.

"Scott Dale Robison" <scott-news.digitalmars.com isdr.net> wrote in message
news:b8iu8v$2bhh$1 digitaldaemon.com...
 In trying to handle structured exceptions along side c++ exceptions,
 I've discovered the _set_se_translator from the VC++ RTL. Long story

 1. Is there an equivalent means of mapping SE to C++E in DMC++?

 2. If not, is it on the wish list?

 3. If not, please add it to the wish list. :)

 Thanks muchly for your time.

 SDR

Apr 30 2003
next sibling parent reply Scott Dale Robison <scott-news.digitalmars.com isdr.net> writes:
Walter wrote:
 The structured exception handling constructs __try, __except, and __finally
 work in DMC++.
 
 "Scott Dale Robison" <scott-news.digitalmars.com isdr.net> wrote in message
 news:b8iu8v$2bhh$1 digitaldaemon.com...
 
In trying to handle structured exceptions along side c++ exceptions,
I've discovered the _set_se_translator from the VC++ RTL. Long story

short:
1. Is there an equivalent means of mapping SE to C++E in DMC++?

2. If not, is it on the wish list?

3. If not, please add it to the wish list. :)

Thanks muchly for your time.


Right, they do work. What I'm wanting to do is portably (across multiple Win32 targeting c++ compilers) translate structured exceptions to c++ exceptions, which is difficult when they two modes of exception handling can't be mixed. _set_se_translator allows a routine to be registered that will be called when a structured exception occurs. That routine is then free to translate the structured exception in whatever way desired and then throw it. Anyway, I'll keep exploring it from this end. Thanks for your time. SDR
Apr 30 2003
parent reply "Walter" <walter digitalmars.com> writes:
"Scott Dale Robison" <scott-news.digitalmars.com isdr.net> wrote in message
news:b8p9rg$ldp$1 digitaldaemon.com...
 Right, they do work. What I'm wanting to do is portably (across multiple
 Win32 targeting c++ compilers) translate structured exceptions to c++
 exceptions, which is difficult when they two modes of exception handling
 can't be mixed. _set_se_translator allows a routine to be registered
 that will be called when a structured exception occurs. That routine is
 then free to translate the structured exception in whatever way desired
 and then throw it.

Check out the source code in \dm\src\core\except.cpp.
May 01 2003
parent reply Scott Dale Robison <scott-news.digitalmars.com isdr.net> writes:
Walter wrote:
 "Scott Dale Robison" <scott-news.digitalmars.com isdr.net> wrote in message
 news:b8p9rg$ldp$1 digitaldaemon.com...
 
Right, they do work. What I'm wanting to do is portably (across multiple
Win32 targeting c++ compilers) translate structured exceptions to c++
exceptions, which is difficult when they two modes of exception handling
can't be mixed. _set_se_translator allows a routine to be registered
that will be called when a structured exception occurs. That routine is
then free to translate the structured exception in whatever way desired
and then throw it.

Check out the source code in \dm\src\core\except.cpp.

Thanks... if I come up with something useful, I'll forward it along. SDR
May 01 2003
parent reply Carlos Smith <carlos.smith sympatico.ca> writes:
Scott Dale Robison wrote:
 Walter wrote:
 
 "Scott Dale Robison" <scott-news.digitalmars.com isdr.net> wrote in 
 message
 news:b8p9rg$ldp$1 digitaldaemon.com...
 ....


Hi, did you came up with something ? I am trying to port UnderC interpreter to DMC++. UnderC use this function. (_set_se_translator) I would like to compile UnderC with no modifications. As of today, my C++ is not strong enough to allow me to come up with something useful... :-( So any help would be good :-)) TIA
 
 SDR
 

Jan 27 2005
parent Scott Dale Robison <scott isdr.net> writes:
Carlos Smith wrote:
 Scott Dale Robison wrote:
 
 Walter wrote:

 "Scott Dale Robison" <scott-news.digitalmars.com isdr.net> wrote in 
 message
 news:b8p9rg$ldp$1 digitaldaemon.com...
 ....

Thanks... if I come up with something useful, I'll forward it along.

Hi, did you came up with something ? I am trying to port UnderC interpreter to DMC++. UnderC use this function. (_set_se_translator) I would like to compile UnderC with no modifications. As of today, my C++ is not strong enough to allow me to come up with something useful... :-( So any help would be good :-))

No, I didn't. I don't recall *what* sidetracked me, but I never delved deeper into it. I'll see if I can't come up with something, but don't know exactly how long it might take. SDR
Jan 27 2005
prev sibling parent reply Scott Dale Robison <scott-news.digitalmars.com isdr.net> writes:
Walter wrote:
 The structured exception handling constructs __try, __except, and __finally
 work in DMC++.
 
 "Scott Dale Robison" <scott-news.digitalmars.com isdr.net> wrote in message
 news:b8iu8v$2bhh$1 digitaldaemon.com...
 
In trying to handle structured exceptions along side c++ exceptions,
I've discovered the _set_se_translator from the VC++ RTL. Long story

short:
1. Is there an equivalent means of mapping SE to C++E in DMC++?

2. If not, is it on the wish list?

3. If not, please add it to the wish list. :)

Thanks muchly for your time.


Right, they do work. What I'm wanting to do is portably (across multiple Win32 targeting c++ compilers) translate structured exceptions to c++ exceptions, which is difficult when they two modes of exception handling can't be mixed. _set_se_translator allows a routine to be registered that will be called when a structured exception occurs. That routine is then free to translate the structured exception in whatever way desired and then throw it. Anyway, I'll keep exploring it from this end. Thanks for your time. SDR
May 10 2003
parent Scott Dale Robison <scott-news.digitalmars.com isdr.net> writes:
Scott Dale Robison wrote:
<snipped>
Uh, not sure how I managed that. Apologies for the duplicate post...

SDR
May 11 2003