← Back to team overview

dolfin team mailing list archive

Re: Buildbot failure

 

On Thu, March 12, 2009 14:14, Johannes Ring wrote:
> On Thu, March 12, 2009 13:41, Johannes Ring wrote:
>> I also have a problem when running the tests on the Windows buildslave.
>> The problem is that when a test/demo fails, e.g. with a segmentation
>> fault, a window pops up saying that there was a runtime error and then I
>> have to click on 'OK' to continue. Since no one will click on 'OK' on
>> the
>> buildslave it will simply wait until it times out. Any suggestions on
>> how
>> to avoid this without disabling the tests with this behavior? Are there
>> any ways to trap such errors in Python?
>
> The problem seems to be with the error function in dolfin/log/Logger.cpp
> that throws an std::runtime_error. For instance when I run
> test/unit/function/test.py I get
>
> terminate called after throwing an instance of 'std::runtime_error'
>   what():  *** Error: DOLFIN has been compiled without GTS, intersection
> detection not available.
>
> and a window that pops up. Is it perhaps possible to convert the
> std::runtime_error to a Python exception with SWIG?

In dolfin/swig/dolfin_exceptions.i we have this:

   // all runtime_error subclasses
   catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, const_cast<char*>(e.what()));
      return NULL;
   }

Shouldn't this make sure that a Python exception is raised instead of
throwing a runtime_error?

Johannes



References