demangle_typename : improve exception safety