Commit 6b1a98cd authored by Erik Verbruggen's avatar Erik Verbruggen

Fixed too eager asserts: thrown exceptions are expected and handled in the TextToModelMerger.

parent a196317c
......@@ -27,6 +27,7 @@
**
**************************************************************************/
#include "exception.h"
#include "qmldesignerplugin.h"
#include "designmode.h"
#include "qmldesignerconstants.h"
......@@ -53,6 +54,16 @@ namespace Internal {
BauhausPlugin::BauhausPlugin() :
m_designerCore(0)
{
// Exceptions should never ever assert: they are handled in a number of
// places where it is actually VALID AND EXPECTED BEHAVIOUR to get an
// exception.
// If you still want to see exactly where the exception originally
// occurred, then you have various ways to do this:
// 1. set a breakpoint on the constructor of the exception
// 2. in gdb: "catch throw" or "catch throw Exception"
// 3. set a breakpoint on __raise_exception()
// And with gdb, you can even do this from your ~/.gdbinit file.
Exception::setShouldAssert(false);
}
BauhausPlugin::~BauhausPlugin()
......
......@@ -71,7 +71,7 @@ const char* demangle(const char* name)
#endif
bool Exception::s_shouldAssert = true;
bool Exception::s_shouldAssert = false;
void Exception::setShouldAssert(bool assert)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment