2020-03-24 20:33:24 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-04-14 19:31:29 +00:00
|
|
|
#include <Arduino.h>
|
|
|
|
|
2020-12-30 04:34:22 +00:00
|
|
|
#include "mesh/generated/mesh.pb.h" // For CriticalErrorCode
|
2020-03-24 20:33:24 +00:00
|
|
|
|
2021-04-29 01:52:15 +00:00
|
|
|
/// A macro that include filename and line
|
2021-05-01 03:27:37 +00:00
|
|
|
#define RECORD_CRITICALERROR(code) recordCriticalError(code, __LINE__, __FILE__)
|
2021-04-29 01:52:15 +00:00
|
|
|
|
2020-03-24 20:33:24 +00:00
|
|
|
/// Record an error that should be reported via analytics
|
2021-04-29 01:52:15 +00:00
|
|
|
void recordCriticalError(CriticalErrorCode code = CriticalErrorCode_Unspecified, uint32_t address = 0, const char *filename = NULL);
|