mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Phrase error messages as "Failed to", not "Could not" or "Couldn't" (#1298)
This commit is contained in:
@@ -452,7 +452,7 @@ void obj_ReadFile(char const *fileName, unsigned int fileID)
|
||||
file = fdopen(STDIN_FILENO, "rb"); // `stdin` is in text mode by default
|
||||
|
||||
if (!file)
|
||||
err("Could not open file %s", fileName);
|
||||
err("Failed to open file %s", fileName);
|
||||
|
||||
// First, check if the object is a RGBDS object or a SDCC one. If the first byte is 'R',
|
||||
// we'll assume it's a RGBDS object file, and otherwise, that it's a SDCC object file.
|
||||
@@ -551,7 +551,7 @@ void obj_ReadFile(char const *fileName, unsigned int fileID)
|
||||
struct Symbol *symbol = (struct Symbol *)malloc(sizeof(*symbol));
|
||||
|
||||
if (!symbol)
|
||||
err("%s: Couldn't create new symbol", fileName);
|
||||
err("%s: Failed to create new symbol", fileName);
|
||||
readSymbol(file, symbol, fileName, nodes[fileID].nodes);
|
||||
|
||||
fileSymbols[i] = symbol;
|
||||
@@ -570,7 +570,7 @@ void obj_ReadFile(char const *fileName, unsigned int fileID)
|
||||
// Read section
|
||||
fileSections[i] = (struct Section *)malloc(sizeof(*fileSections[i]));
|
||||
if (!fileSections[i])
|
||||
err("%s: Couldn't create new section", fileName);
|
||||
err("%s: Failed to create new section", fileName);
|
||||
|
||||
fileSections[i]->nextu = NULL;
|
||||
readSection(file, fileSections[i], fileName, nodes[fileID].nodes);
|
||||
@@ -579,8 +579,7 @@ void obj_ReadFile(char const *fileName, unsigned int fileID)
|
||||
fileSections[i]->symbols =
|
||||
(struct Symbol **)malloc(nbSymPerSect[i] * sizeof(*fileSections[i]->symbols));
|
||||
if (!fileSections[i]->symbols)
|
||||
err("%s: Couldn't link to symbols",
|
||||
fileName);
|
||||
err("%s: Failed to link to symbols", fileName);
|
||||
} else {
|
||||
fileSections[i]->symbols = NULL;
|
||||
}
|
||||
@@ -630,7 +629,7 @@ void obj_ReadFile(char const *fileName, unsigned int fileID)
|
||||
struct Assertion *assertion = (struct Assertion *)malloc(sizeof(*assertion));
|
||||
|
||||
if (!assertion)
|
||||
err("%s: Couldn't create new assertion", fileName);
|
||||
err("%s: Failed to create new assertion", fileName);
|
||||
readAssertion(file, assertion, fileName, i, nodes[fileID].nodes);
|
||||
linkPatchToPCSect(&assertion->patch, fileSections);
|
||||
assertion->fileSymbols = fileSymbols;
|
||||
|
||||
Reference in New Issue
Block a user