We want buffer::bad_alloc, not std::bad_alloc. Otheriwise, we end
up with a confusing error
failed decoding of frame header: Bad allocation
from ProtocolV2::run_continuation(), printed after frame header is
successfully decoded.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit
67bb6cf524975ea54d539c5b10ba83fa496a1ced)
try {
rx_buffer = buffer::ptr_node::create(buffer::create_aligned(
onwire_len, align));
- } catch (std::bad_alloc&) {
+ } catch (const ceph::buffer::bad_alloc&) {
// Catching because of potential issues with satisfying alignment.
ldout(cct, 1) << __func__ << " can't allocate aligned rx_buffer"
<< " len=" << onwire_len