Theano/Theano — pull request #1538 by nouiz (2013-09-27 14:53:01+00:00)
Title: Better error handling and buildbot

The important thing now is that we don't override an error in device_free if there was already a python error.

This help to see the first error, as in the clean up, the cuda driver sometimes is in a so bad state that cudaFree fail for valid input.

There is also a small thing about the buildbot.

One question, when there is an error, currently, we always cleanup the output of the node, even if the output was preallocated. This is safe, as we can c_sync on the output even if there is a failure. So we could never decref them in the case of error. This help make the error handling code easier, it help debug as we will have the allocated output available and this remove this potential consecutive error!

Why we wheren't doing this before? Just because we didn't saw this? Should we now suggest to don't clean up the node output, but just the other op temp stuff?