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 2481d39
Show file tree
Hide file tree
Showing 2 changed files with 6 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
4 changes: 4 additions & 0 deletions util/include/rusefi/critical_error.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#pragma once

// todo: implement var arg version of this method in main firmware
void efiCriticalError(const char *message);

0 comments on commit 2481d39

Please sign in to comment.