]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/maputils.cpp
Store the value of the key in key_error
[libs/core.git] / source / core / maputils.cpp
index 4fcc8e2176769832b02f9d301810e1fd078fd9e0..28739f05ca86c59a3419e3d1f1f2dfe6c93539b7 100644 (file)
@@ -1,12 +1,14 @@
 #include <msp/debug/demangle.h>
+#include <msp/strings/format.h>
 #include "maputils.h"
 
 using namespace std;
 
 namespace Msp {
 
-key_error::key_error(const type_info &t):
-       runtime_error(Debug::demangle(t.name()))
-{ }
+string key_error::make_what(const type_info &type, const string &value)
+{
+       return format("%s(%s)", Debug::demangle(type.name()), value);
+}
 
 } // namespace Msp