From 0bf8e97830f3c6ec2de91935091389890bec44ac Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Sun, 17 May 2020 17:49:32 +0200 Subject: [PATCH] better error output for invalid passed cookie --- devicehandlers/DeviceHandlerBase.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/devicehandlers/DeviceHandlerBase.cpp b/devicehandlers/DeviceHandlerBase.cpp index ac9d15c1..f52ddbad 100644 --- a/devicehandlers/DeviceHandlerBase.cpp +++ b/devicehandlers/DeviceHandlerBase.cpp @@ -12,6 +12,8 @@ #include #include +#include + object_id_t DeviceHandlerBase::powerSwitcherId = 0; object_id_t DeviceHandlerBase::rawDataReceiverId = 0; object_id_t DeviceHandlerBase::defaultFDIRParentId = 0; @@ -39,9 +41,9 @@ DeviceHandlerBase::DeviceHandlerBase(object_id_t setObjectId, insertInCommandMap(RAW_COMMAND_ID); if (comCookie == nullptr) { sif::error << "DeviceHandlerBase: ObjectID 0x" << std::hex << - this->getObjectId() << std::dec << ": Do not pass nullptr as a" - " cookie, consider passing a dummy cookie instead!" << - std::endl; + std::setw(8) << std::setfill('0') << this->getObjectId() << + std::dec << ": Do not pass nullptr as a cookie, consider " + "passing a dummy cookie instead!" << std::endl; } if (this->fdirInstance == nullptr) { this->fdirInstance = new DeviceHandlerFailureIsolation(setObjectId,