]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: fix the macros for malformed_input::what() 4521/head
authorKefu Chai <kchai@redhat.com>
Fri, 1 May 2015 11:52:25 +0000 (04:52 -0700)
committerKefu Chai <kchai@redhat.com>
Wed, 13 May 2015 02:08:10 +0000 (10:08 +0800)
commit54fd4e054fe7407f9c23c0f2d9832ebe5fd273e6
tree1182879a4dd0271f912c54832fd1b8bbc06b3ab9
parentbf0bdbc09fa87a89541d934091bc613b397fd7bb
common: fix the macros for malformed_input::what()

the thrown exception of malformed_input should carry the function name in
which it was thrown. but what we have now is something like:
"buffer::malformed_input: __PRETTY_FUNCTION__ unknown encoding version >
100"
because __PRETTY_FUNCTION__ is not a macro any more. see
- https://gcc.gnu.org/onlinedocs/gcc-3.1/gcc/Function-Names.html
- https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html
and it is not a string literal, so neither can we can concat it with
the literal err message.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/include/buffer.h
src/include/encoding.h
src/test/encoding.cc