]> git.tdb.fi Git - libs/core.git/blob - source/core/maputils.cpp
Use the new utilities to format some strings
[libs/core.git] / source / core / maputils.cpp
1 #include <msp/debug/demangle.h>
2 #include <msp/strings/format.h>
3 #include <msp/strings/utils.h>
4 #include "maputils.h"
5
6 using namespace std;
7
8 namespace Msp {
9
10 string key_error::make_what(const type_info &type, const string &value)
11 {
12         if(&type==&typeid(string))
13                 return format("\"%s\"", c_escape(value));
14         else
15                 return format("%s(%s)", Debug::demangle(type.name()), value);
16 }
17
18 } // namespace Msp