THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/01/2005 at 13:34, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.206
Platform: Mac ; Mac OSX ;
Language(s) : C++ ;
---------
This really isn't an SDK question, but I cannot find any information about this.
Porting my Windows C4D plugin over to MacOS. Using CodeWarrior 9. Everything compiles great and my plugin runs well in C4D R9 on MacOSX.
But, everytime I throw a custom exception, C4D disappears (i.e.: crashes). This did not happen on Windows ever (VSC++ 6.0).
To clarify, custom exception means - not derived from any exception class (which may be the problem in CW on Mac, but no information to be found). Here's the class:
// CLASS: Error Exception
class ErrorException
{
private:
INT error;
String text;
String text2;
public:
ErrorException(INT err, String txt);
ErrorException(INT err, String line1, String line2);
INT GetError();
String GetString();
String GetString2();
};
And I throw/catch it like this:
try
{
// Do something that might throw
throw ErrorException(ERROR_MEMORY, "text");
}
catch (ErrorException ee)
{
ErrDlgCaller::CallErrorDialog(ee.GetError(), ee.GetString(), ee.GetString2(), FALSE);
}
As far as I know, it is perfectly legal to try/throw/catch your own exceptions for your own errors and warnings. So, why does C4D crash on Mac and not on Windows (yes, exceptions are enabled in CW build).
Thanks,
Robert