Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am trying to use try-catch blocks to handle a divide-by-zero exception in marmalade, but I guess marmalade overrides c++ exception handling, so it's not working. I've searched on the forums and the solution seems to be that I have to add one option in the mkb as explained in this post.

options
{
    enable-exceptions=1
}

I already tried adding it, but it's not working too. Is there any way I can handle this exception?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
242 views
Welcome To Ask or Share your Answers For Others

1 Answer

If you are writing an extension for the marmalade exceptions will not work. What the

options
{
    enable-exceptions=1
}

does is adds a compiler options /GX for msvc and --exceptions for RVCT. So if you are using some other compiler like g++ it will not work.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...