Properly handle non serializable exceptions

In case a (non serializable) database exception is thrown (failing constraints etc) the testtools would save it as an ordinary string (Result is not serializable print_r($result)).

Upon test replay this might (and happened in my case) change execution flow as an exception throw is not happening.