From f10c997a226b38c34071341fac70c638933adcb2 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 24 Nov 2008 13:20:52 -0800 Subject: [PATCH] make assertion output look more like gcc --- src/common/assert.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/assert.cc b/src/common/assert.cc index c0abecf1c0e20..8bf15511bab50 100644 --- a/src/common/assert.cc +++ b/src/common/assert.cc @@ -9,13 +9,15 @@ void __ceph_assert_fail(const char *assertion, const char *file, int line, const BackTrace bt(1); _dout_lock.TryLock(); - *_dout << file << ":" << line << ": FAILED assert in \'" << func << "\': " << assertion << std::endl; + *_dout << file << ": In function '" << func << "':" << std::endl; + *_dout << file << ":" << line << ": FAILED assert(" << assertion << ")" << std::endl; bt.print(*_dout); *_dout << " NOTE: a copy of the executable, or `objdump -rdS ` is needed to interpret this." << std::endl; _dout->flush(); - cerr << file << ":" << line << ": FAILED assert in \'" << func << "\': " << assertion << std::endl; + cerr << file << ": In function '" << func << "':" << std::endl; + cerr << file << ":" << line << ": FAILED assert(" << assertion << ")" << std::endl; bt.print(cerr); cerr << " NOTE: a copy of the executable, or `objdump -rdS ` is needed to interpret this." << std::endl; cerr.flush(); -- 2.39.5