Some fixes

This commit is contained in:
Jeremy 2023-10-05 11:01:03 -04:00
parent 3b5064f1ff
commit 12b80f7af1
No known key found for this signature in database
GPG Key ID: 19AA8270105E8EB4
5 changed files with 21 additions and 21 deletions

View File

@ -16,14 +16,14 @@
#include "platform/utils.hpp"
#include "platform/object.hpp"
#define ESC "\033["
#define RESET ESC "0m"
#define RED ESC "31m"
#define GREEN ESC "32m"
#define YELLOW ESC "33m"
#define BLUE ESC "34m"
#define MAGENTA ESC "35m"
#define CYAN ESC "36m"
#define ESC "\033[" // NOSONAR
#define RESET ESC "0m" // NOSONAR
#define RED ESC "31m" // NOSONAR
#define GREEN ESC "32m" // NOSONAR
#define YELLOW ESC "33m" // NOSONAR
#define BLUE ESC "34m" // NOSONAR
#define MAGENTA ESC "35m" // NOSONAR
#define CYAN ESC "36m" // NOSONAR
namespace cpptrace {
CPPTRACE_FORCE_NO_INLINE CPPTRACE_API
@ -40,7 +40,7 @@ namespace cpptrace {
object_trace raw_trace::resolve_object_trace() const {
try {
return object_trace(detail::get_frames_object_info(frames));
} catch(...) {
} catch(...) { // NOSONAR
if(!detail::should_absorb_trace_exceptions()) {
throw;
}
@ -56,7 +56,7 @@ namespace cpptrace {
frame.symbol = detail::demangle(frame.symbol);
}
return stacktrace(std::move(trace));
} catch(...) {
} catch(...) { // NOSONAR
if(!detail::should_absorb_trace_exceptions()) {
throw;
}
@ -88,7 +88,7 @@ namespace cpptrace {
stacktrace object_trace::resolve() const {
try {
return stacktrace(detail::resolve_frames(frames));
} catch(...) {
} catch(...) { // NOSONAR
if(!detail::should_absorb_trace_exceptions()) {
throw;
}
@ -241,7 +241,7 @@ namespace cpptrace {
raw_trace generate_raw_trace(std::uint_least32_t skip) {
try {
return raw_trace(detail::capture_frames(skip + 1, UINT_LEAST32_MAX));
} catch(...) {
} catch(...) { // NOSONAR
if(!detail::should_absorb_trace_exceptions()) {
throw;
}
@ -253,7 +253,7 @@ namespace cpptrace {
raw_trace generate_raw_trace(std::uint_least32_t skip, std::uint_least32_t max_depth) {
try {
return raw_trace(detail::capture_frames(skip + 1, max_depth));
} catch(...) {
} catch(...) { // NOSONAR
if(!detail::should_absorb_trace_exceptions()) {
throw;
}
@ -265,7 +265,7 @@ namespace cpptrace {
object_trace generate_object_trace(std::uint_least32_t skip) {
try {
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()) {
throw;
}
@ -277,7 +277,7 @@ namespace cpptrace {
object_trace generate_object_trace(std::uint_least32_t skip, std::uint_least32_t max_depth) {
try {
return object_trace(detail::get_frames_object_info(detail::capture_frames(skip + 1, max_depth)));
} catch(...) {
} catch(...) { // NOSONAR
if(!detail::should_absorb_trace_exceptions()) {
throw;
}
@ -299,7 +299,7 @@ namespace cpptrace {
frame.symbol = detail::demangle(frame.symbol);
}
return stacktrace(std::move(trace));
} catch(...) {
} catch(...) { // NOSONAR
if(!detail::should_absorb_trace_exceptions()) {
throw;
}

View File

@ -301,7 +301,7 @@ namespace addr2line {
for(size_t i = 0; i < output.size(); i++) {
update_trace(output[i], i, entries_vec);
}
} catch(...) {
} catch(...) { // NOSONAR
if(!should_absorb_trace_exceptions()) {
throw;
}

View File

@ -408,7 +408,7 @@ namespace dbghelp {
for(const auto frame : frames) {
try {
trace.push_back(resolve_frame(proc, frame));
} catch(...) {
} catch(...) { // NOSONAR
if(!detail::should_absorb_trace_exceptions()) {
throw;
}

View File

@ -77,7 +77,7 @@ namespace libbacktrace {
);
}
return frame;
} catch(...) {
} catch(...) { // NOSONAR
if(!should_absorb_trace_exceptions()) {
throw;
}

View File

@ -667,7 +667,7 @@ namespace libdwarf {
const auto& dlframe = entry.first.get();
auto& frame = entry.second.get();
frame = resolver->resolve_frame(dlframe);
} catch(...) {
} catch(...) { // NOSONAR
if(!should_absorb_trace_exceptions()) {
throw;
}
@ -678,7 +678,7 @@ namespace libdwarf {
// .emplace needed, for some reason .insert tries to copy <= gcc 7.2
resolver_map.emplace(obj_name, std::move(resolver_object).unwrap());
}
} catch(...) {
} catch(...) { // NOSONAR
if(!should_absorb_trace_exceptions()) {
throw;
}