>
> Without knowing the context where the map is created and modified, is it 
> possible that a previous caught exception has left the map in a 
> questionable state or failed to add an entry when it terminated some 
> function that wasn't expecting exceptions? 



Thanks for the feedback.  Actually, it turns out that the problem is 
definitely linked to including this line in bootstrap.cpp

    // clang_compiler->getLangOpts().Exceptions  = 1;    // exception 
handling
What I experience now is that exceptions are only partially detected (not 
surprisingly after commenting out this line). 
However, at least all other C++ functions are working again.   For example 
the following 

cxx"""
#include <iostream> //std::cerr

     double divide(double x, double y)
     {
           double z = x/y;
           return z;
     }

     void zeroDivExceptionTest(double a, double b)
     {
           try
           {
               double c = divide(a, b);
               std::cout<<"Result is: " << c <<std::endl;
           }
           catch(...)
           {
               std::cerr<< "Divide by zero error!" <<std::endl;
           }
     }
"""

julia> @cxx zeroDivExceptionTest(10.5, 5.5) 
Result is: 1.90909 

julia> @cxx zeroDivExceptionTest(10.5, 0) 
Result is: inf

The exception is not caught (no error message), but at least the program 
does not crash with zero division. 
This is clearly not good enough long-term, but ok for now.

Reply via email to