Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Exception Handling

    SDK Help
    0
    4
    931
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 09/12/2002 at 15:26, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.012 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      I am converting from R7 to R8, and I use containers from the Standard Template Library (STL). This requires exception handling. However, if I check "Enable Exception Handling" in the Project Settings for C++ Language, I get compile warnings for the use of gNew.
      Do you have any suggestions how I can get this to work together?
      Thank you,
      Jane

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 09/12/2002 at 22:58, xxxxxxxx wrote:

        The compiler error suggests what to do, so just add these to c4d_memory.h:

            
            
            void operator delete(void *p,int line,const CHAR *file);  
            void operator delete[](void *p,int line,const CHAR *file);
        

        And these to c4d_memory.cpp:

            
            
            void operator delete(void *p, int line,const CHAR *file)  
            {  
              delete p;  
            }  
              
            void operator delete[](void *p, int line,const CHAR *file)  
            {  
              delete p;  
            }
        

        Otherwise the gNew operator is exception unsafe in debug mode as reported (warning C4291).

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 10/12/2002 at 12:29, xxxxxxxx wrote:

          Do you plan to add these to the API permanently?
          Thanks,
          Jane

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 10/12/2002 at 13:49, xxxxxxxx wrote:

            That's not for me to say or decide, but I can just say that the above was a direct cut and paste from a previous internal bug report of mine on the subject... 🙂
            If you don't want to change the API you can probably also place them in one of your own files. (This way you won't have to redo the changes with new API versions.)

            1 Reply Last reply Reply Quote 0
            • First post
              Last post