[olympic/keel] Improve error clarity on pack some common failures

This commit is contained in:
Gary Talent 2023-12-30 13:58:42 -06:00
parent bd2aeee276
commit 8acc6244d5
2 changed files with 10 additions and 2 deletions

View File

@ -125,7 +125,11 @@ ox::Error preloadDir(
auto const dir = ox::sfmt("{}{}/", path, name);
oxReturnError(preloadDir(ts, romFs, pl, dir));
} else {
oxReturnError(preloadObj(ts, romFs, pl, filePath));
auto const err = preloadObj(ts, romFs, pl, filePath);
if (err) {
oxErrf("\033[31;1;1mCould not preload {}:\n\t{}\n", filePath, toStr(err));
return err;
}
}
}
return {};

View File

@ -120,7 +120,11 @@ static ox::Error transformClaw(
auto const dir = ox::sfmt("{}{}/", path, name);
oxReturnError(transformClaw(ctx, ts, dest, dir));
} else {
oxReturnError(doTransformations(ctx, ts, dest, filePath));
auto const err = doTransformations(ctx, ts, dest, filePath);
if (err) {
oxErrf("\033[31;1;1mCould not do transformations for {}:\n\t{}\n", filePath, toStr(err));
return err;
}
}
}
return {};