Some fixes
This commit is contained in:
parent
3b5064f1ff
commit
12b80f7af1
@ -16,14 +16,14 @@
|
|||||||
#include "platform/utils.hpp"
|
#include "platform/utils.hpp"
|
||||||
#include "platform/object.hpp"
|
#include "platform/object.hpp"
|
||||||
|
|
||||||
#define ESC "\033["
|
#define ESC "\033[" // NOSONAR
|
||||||
#define RESET ESC "0m"
|
#define RESET ESC "0m" // NOSONAR
|
||||||
#define RED ESC "31m"
|
#define RED ESC "31m" // NOSONAR
|
||||||
#define GREEN ESC "32m"
|
#define GREEN ESC "32m" // NOSONAR
|
||||||
#define YELLOW ESC "33m"
|
#define YELLOW ESC "33m" // NOSONAR
|
||||||
#define BLUE ESC "34m"
|
#define BLUE ESC "34m" // NOSONAR
|
||||||
#define MAGENTA ESC "35m"
|
#define MAGENTA ESC "35m" // NOSONAR
|
||||||
#define CYAN ESC "36m"
|
#define CYAN ESC "36m" // NOSONAR
|
||||||
|
|
||||||
namespace cpptrace {
|
namespace cpptrace {
|
||||||
CPPTRACE_FORCE_NO_INLINE CPPTRACE_API
|
CPPTRACE_FORCE_NO_INLINE CPPTRACE_API
|
||||||
@ -40,7 +40,7 @@ namespace cpptrace {
|
|||||||
object_trace raw_trace::resolve_object_trace() const {
|
object_trace raw_trace::resolve_object_trace() const {
|
||||||
try {
|
try {
|
||||||
return object_trace(detail::get_frames_object_info(frames));
|
return object_trace(detail::get_frames_object_info(frames));
|
||||||
} catch(...) {
|
} catch(...) { // NOSONAR
|
||||||
if(!detail::should_absorb_trace_exceptions()) {
|
if(!detail::should_absorb_trace_exceptions()) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@ namespace cpptrace {
|
|||||||
frame.symbol = detail::demangle(frame.symbol);
|
frame.symbol = detail::demangle(frame.symbol);
|
||||||
}
|
}
|
||||||
return stacktrace(std::move(trace));
|
return stacktrace(std::move(trace));
|
||||||
} catch(...) {
|
} catch(...) { // NOSONAR
|
||||||
if(!detail::should_absorb_trace_exceptions()) {
|
if(!detail::should_absorb_trace_exceptions()) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ namespace cpptrace {
|
|||||||
stacktrace object_trace::resolve() const {
|
stacktrace object_trace::resolve() const {
|
||||||
try {
|
try {
|
||||||
return stacktrace(detail::resolve_frames(frames));
|
return stacktrace(detail::resolve_frames(frames));
|
||||||
} catch(...) {
|
} catch(...) { // NOSONAR
|
||||||
if(!detail::should_absorb_trace_exceptions()) {
|
if(!detail::should_absorb_trace_exceptions()) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
@ -241,7 +241,7 @@ namespace cpptrace {
|
|||||||
raw_trace generate_raw_trace(std::uint_least32_t skip) {
|
raw_trace generate_raw_trace(std::uint_least32_t skip) {
|
||||||
try {
|
try {
|
||||||
return raw_trace(detail::capture_frames(skip + 1, UINT_LEAST32_MAX));
|
return raw_trace(detail::capture_frames(skip + 1, UINT_LEAST32_MAX));
|
||||||
} catch(...) {
|
} catch(...) { // NOSONAR
|
||||||
if(!detail::should_absorb_trace_exceptions()) {
|
if(!detail::should_absorb_trace_exceptions()) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
@ -253,7 +253,7 @@ namespace cpptrace {
|
|||||||
raw_trace generate_raw_trace(std::uint_least32_t skip, std::uint_least32_t max_depth) {
|
raw_trace generate_raw_trace(std::uint_least32_t skip, std::uint_least32_t max_depth) {
|
||||||
try {
|
try {
|
||||||
return raw_trace(detail::capture_frames(skip + 1, max_depth));
|
return raw_trace(detail::capture_frames(skip + 1, max_depth));
|
||||||
} catch(...) {
|
} catch(...) { // NOSONAR
|
||||||
if(!detail::should_absorb_trace_exceptions()) {
|
if(!detail::should_absorb_trace_exceptions()) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
@ -265,7 +265,7 @@ namespace cpptrace {
|
|||||||
object_trace generate_object_trace(std::uint_least32_t skip) {
|
object_trace generate_object_trace(std::uint_least32_t skip) {
|
||||||
try {
|
try {
|
||||||
return object_trace(detail::get_frames_object_info(detail::capture_frames(skip + 1, UINT_LEAST32_MAX)));
|
return object_trace(detail::get_frames_object_info(detail::capture_frames(skip + 1, UINT_LEAST32_MAX)));
|
||||||
} catch(...) {
|
} catch(...) { // NOSONAR
|
||||||
if(!detail::should_absorb_trace_exceptions()) {
|
if(!detail::should_absorb_trace_exceptions()) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
@ -277,7 +277,7 @@ namespace cpptrace {
|
|||||||
object_trace generate_object_trace(std::uint_least32_t skip, std::uint_least32_t max_depth) {
|
object_trace generate_object_trace(std::uint_least32_t skip, std::uint_least32_t max_depth) {
|
||||||
try {
|
try {
|
||||||
return object_trace(detail::get_frames_object_info(detail::capture_frames(skip + 1, max_depth)));
|
return object_trace(detail::get_frames_object_info(detail::capture_frames(skip + 1, max_depth)));
|
||||||
} catch(...) {
|
} catch(...) { // NOSONAR
|
||||||
if(!detail::should_absorb_trace_exceptions()) {
|
if(!detail::should_absorb_trace_exceptions()) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
@ -299,7 +299,7 @@ namespace cpptrace {
|
|||||||
frame.symbol = detail::demangle(frame.symbol);
|
frame.symbol = detail::demangle(frame.symbol);
|
||||||
}
|
}
|
||||||
return stacktrace(std::move(trace));
|
return stacktrace(std::move(trace));
|
||||||
} catch(...) {
|
} catch(...) { // NOSONAR
|
||||||
if(!detail::should_absorb_trace_exceptions()) {
|
if(!detail::should_absorb_trace_exceptions()) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -301,7 +301,7 @@ namespace addr2line {
|
|||||||
for(size_t i = 0; i < output.size(); i++) {
|
for(size_t i = 0; i < output.size(); i++) {
|
||||||
update_trace(output[i], i, entries_vec);
|
update_trace(output[i], i, entries_vec);
|
||||||
}
|
}
|
||||||
} catch(...) {
|
} catch(...) { // NOSONAR
|
||||||
if(!should_absorb_trace_exceptions()) {
|
if(!should_absorb_trace_exceptions()) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -408,7 +408,7 @@ namespace dbghelp {
|
|||||||
for(const auto frame : frames) {
|
for(const auto frame : frames) {
|
||||||
try {
|
try {
|
||||||
trace.push_back(resolve_frame(proc, frame));
|
trace.push_back(resolve_frame(proc, frame));
|
||||||
} catch(...) {
|
} catch(...) { // NOSONAR
|
||||||
if(!detail::should_absorb_trace_exceptions()) {
|
if(!detail::should_absorb_trace_exceptions()) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,7 +77,7 @@ namespace libbacktrace {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
return frame;
|
return frame;
|
||||||
} catch(...) {
|
} catch(...) { // NOSONAR
|
||||||
if(!should_absorb_trace_exceptions()) {
|
if(!should_absorb_trace_exceptions()) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -667,7 +667,7 @@ namespace libdwarf {
|
|||||||
const auto& dlframe = entry.first.get();
|
const auto& dlframe = entry.first.get();
|
||||||
auto& frame = entry.second.get();
|
auto& frame = entry.second.get();
|
||||||
frame = resolver->resolve_frame(dlframe);
|
frame = resolver->resolve_frame(dlframe);
|
||||||
} catch(...) {
|
} catch(...) { // NOSONAR
|
||||||
if(!should_absorb_trace_exceptions()) {
|
if(!should_absorb_trace_exceptions()) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
@ -678,7 +678,7 @@ namespace libdwarf {
|
|||||||
// .emplace needed, for some reason .insert tries to copy <= gcc 7.2
|
// .emplace needed, for some reason .insert tries to copy <= gcc 7.2
|
||||||
resolver_map.emplace(obj_name, std::move(resolver_object).unwrap());
|
resolver_map.emplace(obj_name, std::move(resolver_object).unwrap());
|
||||||
}
|
}
|
||||||
} catch(...) {
|
} catch(...) { // NOSONAR
|
||||||
if(!should_absorb_trace_exceptions()) {
|
if(!should_absorb_trace_exceptions()) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user