(9848) C++ _THROWC? throw, try, catch and exceptions?

Archive of the OpenVMS Ask the Wizard (ATW) questions and answers database.
Locked

Topic author
User
Visitor
Posts: 0
Joined: Mon Jan 10, 2022 8:16 am
Reputation: 0
Status: Offline

(9848) C++ _THROWC? throw, try, catch and exceptions?

Post by User » Sun Nov 28, 2004 8:26 am

Hello,

i'm porting a source code to OpenVMS. It is written in C++.
Now, there is a function like this:

if ( __refcount != 0 ){
_THROWC( "ERROR: Object collected with non-zero refcount" );
return;
}

The definition is:

#define _THROWC(y) throw THROW_TYPE(y)

What is _THROW and which makes it? And which function can i use under OpenVMS?
Or what is the best way to move this code to OpenVMS.

Thank you very much!


Wizard
Visitor
Posts: 0
Joined: Mon Jan 10, 2022 8:17 am
Reputation: 0
Status: Offline

Re: (9848) C++ _THROWC? throw, try, catch and exceptions?

Post by Wizard » Mon Nov 29, 2004 8:26 am

This appears to be a use of various comparatively recent signal-handling
additions to C++, and specifically the try, throw and catch calls.

Standard signal handling or the C call perror would be obvious mapping,
as would the OpenVMS condition handling facility. Details on the use of
try, throw and catch, and of the OpenVMS condition handling facility,
are included in the C++ documentation for OpenVMS.

The OpenVMS (and C++) documentation is available at:
https://www.vmssoftware.com/documents_list.html

http://www.hp.com/go/openvms/doc/

Locked