Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Sources/OpenAttributeGraphCxx/Graph/OAGGraphTracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
// OpenAttributeGraphCxx

#include <OpenAttributeGraph/OAGGraphTracing.h>
#include <OpenAttributeGraphCxx/Graph/Graph.hpp>

namespace OAG {
void Graph::trace_assertion_failure(bool remove, const char *format, ...) OAG_NOEXCEPT {
// TODO
}
} /* OAG */

void OAGGraphStartTracing(_Nullable OAGGraphRef graph, OAGGraphTraceOptions options) {
OAGGraphStartTracing2(graph, options, NULL);
Expand Down
9 changes: 4 additions & 5 deletions Sources/OpenAttributeGraphCxx/Misc/assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

#include <OpenAttributeGraphCxx/Misc/assert.hpp>
#include <OpenAttributeGraphCxx/Misc/log.hpp>
#include <OpenAttributeGraphCxx/Graph/Graph.hpp>

#include <stdio.h>
#include <stdlib.h>

char* error_message = nullptr;
static char* error_message = nullptr;

namespace OAG {
void precondition_failure(const char *format, ...) {
Expand All @@ -19,9 +20,7 @@ void precondition_failure(const char *format, ...) {
va_end(va);
if (s != nullptr) {
platform_log_error(error_log(), "precondition failure: %s", s);
#if OAG_TARGET_RELEASE >= OAG_RELEASE_2023
// OAG::Graph::trace_assertion_failure(true, "precondition failure: %s", s)
#endif
Graph::trace_assertion_failure(true, "precondition failure: %s", s);
if (error_message == nullptr) {
asprintf(&error_message, "OpenAttributeGraph precondition failure: %s.\n", s);
}
Expand All @@ -38,8 +37,8 @@ void non_fatal_precondition_failure(const char *format, ...) {
va_end(va);
if (s != nullptr) {
platform_log_fault(error_log(), "precondition failure: %s", s);
Graph::trace_assertion_failure(false, "precondition failure: %s", s);
free(s);
}
return;
}
} /* OAG */
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ class Graph final {

const void value_mark_all() const OAG_NOEXCEPT;

static void trace_assertion_failure(bool, const char *, ...) OAG_NOEXCEPT;

static void all_start_profiling(uint32_t) OAG_NOEXCEPT;
static void all_stop_profiling() OAG_NOEXCEPT;
void start_profiling(uint32_t) OAG_NOEXCEPT;
Expand Down