Commit 24829343 authored by Jens Kroeger's avatar Jens Kroeger
Browse files

Merge branch 'extend_clipboard' into 'master'

Clipboard: improve warning message

See merge request !204
parents 310d0f4d 282964af
Pipeline #1254501 passed with stages
in 17 minutes and 1 second
......@@ -17,6 +17,7 @@
#include <unordered_map>
#include "core/utils/log.h"
#include "core/utils/type.h"
#include "objects/Event.hpp"
#include "objects/Object.hpp"
......
......@@ -19,10 +19,11 @@ namespace corryvreckan {
type =
m_data.insert(type, ClipboardData::value_type(T::getBaseType(), std::map<std::string, std::shared_ptr<void>>()));
// Insert data into data type element, silently fail if it exists already
// Insert data into data type element and print a warning if it exists already
auto test = type->second.insert(std::make_pair(key, std::static_pointer_cast<void>(objects)));
if(!test.second) {
LOG(WARNING) << "Not inserted for " << key;
LOG(WARNING) << "Dataset of type " << corryvreckan::demangle(typeid(T).name()) << " already exists for key \""
<< key << "\", ignoring new data";
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment