Hi folks,

As part of a cross-platform effort, I need to incorporate some rather large 
C++ libraries into Metacard. The first thing I need to produce is an XCMD for 
Macintosh. I've written many in the past in C, but never in C++. What I have 
found is that every time I try to throw an exception, POOF! Metacard quickly 
disappears. No "unexpected error" message, no system crash, it just quits 
abrubtly.
This holds true for an XCMD that looks like this:

void main(XCmdPtr paramPtr) {
  try {
    throw(1);
  } catch(long l) {

  }
}

I found the following notes in my Codewarrior help, which seem related, but I 
can't see how they come into effect:

If exceptions are enabled, you can throw exceptions across any code that's 
compiled by the CodeWarrior C/C++ compiler. You cannot throw exceptions 
across the following:
�   Mac OS Toolbox function calls
�   Libraries compiled with exception support turned off
�   Libraries compiled with versions of the CodeWarrior C/C++ compiler 
earlier than CodeWarrior 8
�   Libraries compiled with CodeWarrior Pascal or other _compilers
If you throw an exception across one of these, the code calls _terminate() 
and exits.


I am using CW5, and have compiled with only the following libraries:
InterfaceLib
MSL C.PPC.Lib
MSL RuntimePPC.Lib

Does anyone have an idea what I'm doing wrong? I can't seem to get to the 
bottom of this one.

Thanks,
Brian Yennie
Curriculum Facilitators Corp.


This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm

Reply via email to