-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
}
catch (const LauncherException & exc)
{
- new_job->decrRef();
+ delete new_job;
string error = string("Invalid job \"") + job_name + "\": " + exc.msg;
throw LauncherException(error);
}
XML_Persistence::createJobFromString(const std::string& jobDump)
{
xmlDocPtr doc;
- doc = xmlReadMemory(jobDump.c_str(), jobDump.length(), "noname.xml", NULL, 0);
+ doc = xmlReadMemory(jobDump.c_str(), (int)jobDump.length(), "noname.xml", NULL, 0); //TODO: conversion from size_t to int, possible loss of data
if (doc == NULL)
{
std::string error = "Error in xmlReadMemory in XML_Persistence::createJobFromString, could not parse string: " + jobDump;