/**
  * @param Payone_Api_Request_Interface $request
  * @param Exception
  * @return boolean
  */
 public function saveException(Payone_Api_Request_Interface $request, Exception $ex)
 {
     $domainObject = $this->getFactory()->getModelApi();
     $domainObject->setData($request->toArray());
     $domainObject->setRawRequest($request->__toString());
     $domainObject->setStacktrace($ex->getTraceAsString());
     $domainObject->setResponse(Payone_Core_Model_System_Config_ResponseType::EXCEPTION);
     $domainObject->save();
 }