Handling STL exceptions?



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

    On 17/12/2008 at 14:21, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R9-R11 
    Platform:   Windows  ; Mac  ;  Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    Since I didn't really get a response in my older thread, how are you guys handling exceptions when using STL (std::vector, for instance) in C4D SDK? One would suspect that a try{}catch{} would be enough to handle a thrown exception since the C4D SDK doesn't handle them at all (so the unwind wouldn't eventually find a handler) - but then I could be wrong wrt C++.

    Also, I don't really want to do a catch(...) (catchall) as it comes with some issues so I'm currently only doing std::bad_alloc. Where can I find more info on the exceptions that may arise from, say, std::vector.push_back().

    Finally, what can I do about 'operator new is deprecated' warnings in Xcode 3.1 (because of including STL headers, I supposed)?

    Thanks,


Log in to reply