Skip to content

Commit

Permalink
critical_error.h
Browse files Browse the repository at this point in the history
  • Loading branch information
rusefillc committed Jul 23, 2024
1 parent 51ee7d1 commit 0d5cbb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/include/rusefi/arrays.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <cstring>

#include "scaled_channel.h"
#include "critical_error.h"

/**
* Copies an array from src to dest. The lengths of the arrays must match.
Expand Down Expand Up @@ -52,7 +53,7 @@ template <typename T>
constexpr void clear(T* obj) {
#ifdef WE_HAVE_CRITICAL_ERROR_METHOD
if (obj == nullptr) {
criticalError("clear nullptr");
efiCriticalError("clear nullptr");
return;
}
#endif // WE_HAVE_CRITICAL_ERROR_METHOD
Expand Down
3 changes: 3 additions & 0 deletions util/include/rusefi/critical_error.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#pragma once

void efiCriticalError(const char *fmt, ...);

0 comments on commit 0d5cbb1

Please sign in to comment.