comparison Core/JobsEngine/GenericJobUnserializer.cpp @ 2648:e1893d31652a jobs

serialization of JobHandler
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 31 May 2018 18:44:05 +0200
parents 740983056f9e
children a3f0f61a14ca
comparison
equal deleted inserted replaced
2647:73d7d95dd75e 2648:e1893d31652a
41 #include "Operations/NullOperationValue.h" 41 #include "Operations/NullOperationValue.h"
42 #include "Operations/StringOperationValue.h" 42 #include "Operations/StringOperationValue.h"
43 43
44 namespace Orthanc 44 namespace Orthanc
45 { 45 {
46 IJob* GenericJobUnserializer::UnserializeJob(const Json::Value& source) 46 IJob* GenericJobUnserializer::UnserializeJob(const std::string& type,
47 const Json::Value& source)
47 { 48 {
48 const std::string type = GetString(source, "Type");
49 JobState state = StringToJobState(GetString(source, "State"));
50 49
51 LOG(ERROR) << "Cannot unserialize job of type: " << type; 50 LOG(ERROR) << "Cannot unserialize job of type: " << type;
52 throw OrthancException(ErrorCode_BadFileFormat); 51 throw OrthancException(ErrorCode_BadFileFormat);
53 } 52 }
54 53