mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
* Remove `err` and `warn`, keep `errx` and `warnx`, using them in RGBGFX too * Separate RGBGFX and RGBLINK warnings/errors from main options * Separate `report` function into `error` and `fatal` messages * Implicit newlines for most RGBASM errors
22 lines
549 B
C++
22 lines
549 B
C++
// SPDX-License-Identifier: MIT
|
|
|
|
#ifndef RGBDS_GFX_WARNING_HPP
|
|
#define RGBDS_GFX_WARNING_HPP
|
|
|
|
// Prints the error count, and exits with failure
|
|
[[noreturn]]
|
|
void giveUp();
|
|
|
|
// If any error has been emitted thus far, calls `giveUp()`
|
|
void requireZeroErrors();
|
|
|
|
// Prints an error, and increments the error count
|
|
[[gnu::format(printf, 1, 2)]]
|
|
void error(char const *fmt, ...);
|
|
|
|
// Prints a fatal error, increments the error count, and gives up
|
|
[[gnu::format(printf, 1, 2), noreturn]]
|
|
void fatal(char const *fmt, ...);
|
|
|
|
#endif // RGBDS_GFX_WARNING_HPP
|