From 8acc6244d52e4d5a708323065dd45306fbd55d43 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 30 Dec 2023 13:58:42 -0600 Subject: [PATCH] [olympic/keel] Improve error clarity on pack some common failures --- src/olympic/keel/include/keel/pack.hpp | 6 +++++- src/olympic/keel/src/pack.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/olympic/keel/include/keel/pack.hpp b/src/olympic/keel/include/keel/pack.hpp index 23925b86..97010bb4 100644 --- a/src/olympic/keel/include/keel/pack.hpp +++ b/src/olympic/keel/include/keel/pack.hpp @@ -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 {}; diff --git a/src/olympic/keel/src/pack.cpp b/src/olympic/keel/src/pack.cpp index 02c13ca3..6c337eb0 100644 --- a/src/olympic/keel/src/pack.cpp +++ b/src/olympic/keel/src/pack.cpp @@ -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 {};