comparison Core/JobsEngine/JobsRegistry.cpp @ 2954:d924f9bb61cc

taking advantage of details in OrthancException
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 03 Dec 2018 14:35:34 +0100
parents dc18d5804746
children cb5d75143da0
comparison
equal deleted inserted replaced
2953:210d5afd8f2b 2954:d924f9bb61cc
670 670
671 case JobState_Paused: 671 case JobState_Paused:
672 break; 672 break;
673 673
674 default: 674 default:
675 LOG(ERROR) << "A job should not be loaded from state: " 675 {
676 << EnumerationToString(handler->GetState()); 676 std::string details = ("A job should not be loaded from state: " +
677 throw OrthancException(ErrorCode_InternalError); 677 std::string(EnumerationToString(handler->GetState())));
678 throw OrthancException(ErrorCode_InternalError, details);
679 }
678 } 680 }
679 681
680 LOG(INFO) << "New job submitted with priority " << priority << ": " << id; 682 LOG(INFO) << "New job submitted with priority " << priority << ": " << id;
681 683
682 if (observer_ != NULL) 684 if (observer_ != NULL)