Skip to content

Commit 789fac3

Browse files
committed
Update error message for build error diagnostics
Unable to repro locally
1 parent 603b7d9 commit 789fac3

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tools/nitrogfx/global.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818

1919
#else
2020

21-
#define FATAL_ERROR(format, ...) \
22-
do { \
23-
fprintf(stderr, format, ##__VA_ARGS__); \
24-
abort(); \
21+
#define FATAL_ERROR(format, ...) \
22+
do { \
23+
fprintf(stderr, format, ##__VA_ARGS__); \
24+
fprintf(stderr, " -- %s:%d\n", __FILE__, __LINE__); \
25+
abort(); \
2526
} while (0)
2627

2728
#define UNUSED __attribute__((__unused__))

tools/nitrogfx/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ void ConvertPngToNtr(char *inputPath, char *outputPath, struct PngToNtrOptions *
168168
ApplyCellsToImage(options->cellFilePath, &image, false);
169169
} else {
170170
if (image.pixelsAreRGB || (image.bitDepth != 4 && image.bitDepth != 8)) {
171-
FATAL_ERROR("PNG image %s has unsupported mapping type\n", inputPath);
171+
FATAL_ERROR("PNG image %s has unsupported mapping type: bitDepth=%d and pixels %s RGB\n", inputPath, image.bitDepth, image.pixelsAreRGB ? "are" : "are not");
172172
}
173173
}
174174

0 commit comments

Comments
 (0)