2020-03-24 13:33:24 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
2020-04-14 12:31:29 -07:00
|
|
|
#include <Arduino.h>
|
|
|
|
|
|
2023-01-18 08:56:47 -06:00
|
|
|
#include "mesh/generated/meshtastic/mesh.pb.h" // For CriticalErrorCode
|
2020-03-24 13:33:24 -07:00
|
|
|
|
2021-04-29 09:52:15 +08:00
|
|
|
/// A macro that include filename and line
|
2021-05-01 11:27:37 +08:00
|
|
|
#define RECORD_CRITICALERROR(code) recordCriticalError(code, __LINE__, __FILE__)
|
2021-04-29 09:52:15 +08:00
|
|
|
|
2020-03-24 13:33:24 -07:00
|
|
|
/// Record an error that should be reported via analytics
|
2023-01-21 18:22:19 +01:00
|
|
|
void recordCriticalError(meshtastic_CriticalErrorCode code = meshtastic_CriticalErrorCode_UNSPECIFIED, uint32_t address = 0,
|
2023-06-08 08:07:32 -05:00
|
|
|
const char *filename = NULL);
|