0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-11 22:48:56 +02:00

ircd::util: Better to return the input symbol rather than throwing not_mangled.

This commit is contained in:
Jason Volk 2018-06-11 00:26:20 -07:00
parent 5c919d5503
commit 6236cf230f

View file

@ -72,10 +72,20 @@ ircd::util::demangle(const mutable_buffer &out,
"Demangle failed -1: memory allocation failure"
};
/*
case -2: throw not_mangled
{
"Demangle failed -2: mangled name '%s' is not valid", symbol
};
*/
// No real use case within IRCd for throwing not_mangled which may
// happen for extern "C" related; instead simply copying the input
// to the output (as per expectation) is much better behavior.
case -2: return string_view
{
symbol, strlcpy(out, symbol)
};
case -3: throw demangle_error
{