diff --git a/src/palette_assignment.cpp b/src/palette_assignment.cpp index f6e727d6..4eff0cd8 100644 --- a/src/palette_assignment.cpp +++ b/src/palette_assignment.cpp @@ -97,8 +97,9 @@ AssignResult assignDepthFirst(PtContext &ctx, AssignState &state, std::vector 0) { if (ctx.compilerConfig.pruneCount >= stopLimit) { - // FIXME : proper error message - throw std::runtime_error{"pruneCount pruned every branch"}; + fatalerror(ctx.err, ctx.compilerSrcPaths, ctx.compilerConfig.mode, + fmt::format("'prune-branches' parameter '{}' pruned every branch", + fmt::styled(ctx.compilerConfig.pruneCount, fmt::emphasis::bold))); } stopLimit -= ctx.compilerConfig.pruneCount; } @@ -202,8 +203,9 @@ AssignResult assignBreadthFirst(PtContext &ctx, AssignState &initialState, std:: } else if (ctx.compilerConfig.pruneCount > 0) { if (ctx.compilerConfig.pruneCount >= stopLimit) { - // FIXME : proper error message - throw std::runtime_error{"pruneCount pruned every branch"}; + fatalerror(ctx.err, ctx.compilerSrcPaths, ctx.compilerConfig.mode, + fmt::format("'prune-branches' parameter '{}' pruned every branch", + fmt::styled(ctx.compilerConfig.pruneCount, fmt::emphasis::bold))); } stopLimit -= ctx.compilerConfig.pruneCount; }