Well, I having problem with exception on MinGW too.

The exception below is not catched on Windows, but on Linux works well.

    Glib::RefPtr<Gnome::Glade::Xml> refXml;
    try
    {
        refXml = Gnome::Glade::Xml::create(
                NETWORK_LOGGER_GLADEDIR "/" GLADEFILE, GLADEROOT);
    }
    catch (Gnome::Glade::XmlError& error)
    {
        try
        {
            refXml = Gnome::Glade::Xml::create("src/" GLADEFILE, GLADEROOT);
        }
        catch (Gnome::Glade::XmlError& error2)
        {
            show_error(error.what(), true);
        }
    }



2009/5/20 Olivier Guilyardi <list@samalyse.com>
I am encountering a problem where I rise a C++ exception, which consists in a
class that sub-subclasses std::exception. The constructor of this exception
class is properly called. However, my catch statement is never reached, and the
application freeze, entering a dead loop that eats all cpu.

QtCreator/gdb doesn't tell anything, no source line, no error message, nothing.

The application is multi-threaded, but the throw/catch sequence happens in a
single (worker) thread.

The general idea:

class BaseException: public std::exception
{
public:
   BaseException(std::string message) throw()
   {
       this->message = message;
       DEBUG("Exception: %s", message.c_str());
   }
   ~BaseException() throw() {}

   virtual const char* what() const throw()
   {
       return message.c_str();
   }

protected:
   std::string message;
};


class NotEnoughFramesError: public BaseException {
public:
   NotEnoughFramesError(std::string filename) throw()
           : BaseException("Not enough frames in sample file: " + filename) {}
};


This code works fine on gcc/linux.

Is there anything special I should be aware of when dealing with exceptions in
mingw?

--
 Olivier

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) Thread hijacking
3) HTML/MIME encoded mail
4) Improper quoting
5) Improper trimming
_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users