summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-07-28 11:13:03 +0200
committerYorhel <git@yorhel.nl>2021-07-28 11:13:03 +0200
commit3acab71fce744fe63d7c8b4618c79fed586e83e7 (patch)
tree4a2e9c7d572ca60c766f5bba76c0fbaa4d247001
parent0d314ca0ca4b4caefb8737d041eaf2af3bb6a494 (diff)
Fix reporting of fatal scan error in -0 or -1 UIs
-rw-r--r--src/scan.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/scan.zig b/src/scan.zig
index 6c85f51..38b9a2e 100644
--- a/src/scan.zig
+++ b/src/scan.zig
@@ -1059,6 +1059,8 @@ fn drawBox() void {
}
pub fn draw() void {
+ if (active_context.fatal_error != null and main.config.scan_ui != .full)
+ ui.die("Error reading {s}: {s}\n", .{ active_context.last_error.?, ui.errorString(active_context.fatal_error.?) });
switch (main.config.scan_ui) {
.none => {},
.line => {