mirror of
https://github.com/matrix-construct/construct
synced 2024-10-31 19:08:59 +01:00
ircd::util: Better to return the input symbol rather than throwing not_mangled.
This commit is contained in:
parent
5c919d5503
commit
6236cf230f
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue