2022-04-10 08:22:58 +00:00
|
|
|
// Copyright 2022 Dietrich Epp.
|
|
|
|
// This file is part of SyncFiles. SyncFiles is licensed under the terms of the
|
|
|
|
// Mozilla Public License, version 2.0. See LICENSE.txt for details.
|
|
|
|
#ifndef LIB_UTIL_H
|
|
|
|
#define LIB_UTIL_H
|
2022-04-22 15:36:17 +00:00
|
|
|
#include "lib/error.h"
|
2022-03-30 07:46:19 +00:00
|
|
|
|
2022-04-21 17:57:17 +00:00
|
|
|
// Print an error message and exit.
|
2022-03-30 07:46:19 +00:00
|
|
|
void Fatalf(const char *msg, ...)
|
|
|
|
__attribute__((noreturn, format(printf, 1, 2)));
|
|
|
|
|
2022-04-21 17:57:17 +00:00
|
|
|
// Return a basic description of the given error code, or NULL if the error code
|
|
|
|
// is unknown.
|
2022-03-30 07:46:19 +00:00
|
|
|
const char *ErrorDescription(ErrorCode err);
|
|
|
|
|
|
|
|
#endif
|