added all the new error codes for the exits currently in the code

This commit is contained in:
2026-01-08 12:53:49 +01:00
parent 25a9dfb349
commit 53a2194bde

View File

@@ -80,7 +80,7 @@ void get_data_from_db(const char *query, duckdb_connection *conn, TelemetryInfo
}
int main(int argc, char **argv) {
printf("Hello from HardCompound!\n");
printf("\nHello from HardCompound!\n");
if (argc < 2) {
printf("You need to specify a duckdb file path! Terminating!\n");
@@ -139,6 +139,16 @@ int main(int argc, char **argv) {
LapInfo *session_data = calloc(lap_count, sizeof(LapInfo));
double *lap_timestamps = calloc(lap_count, sizeof(double));
if (!session_data) {
printf("Session data failed to allocate!");
exit(ERR_MEMORY);
}
if (!lap_timestamps) {
printf("Lap timestaps array failed to init!");
exit(ERR_MEMORY);
}
duckdb_result lap_timestamps_res;
if (duckdb_query(conn, "Select ts as DOUBLE from Lap\n", &lap_timestamps_res) == DuckDBError) {
exit(ERR_QUERY);