diff options
Diffstat (limited to 'src/sam_edit.zig')
| -rw-r--r-- | src/sam_edit.zig | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/sam_edit.zig b/src/sam_edit.zig index b06379f9..a6ed5772 100644 --- a/src/sam_edit.zig +++ b/src/sam_edit.zig @@ -611,15 +611,11 @@ const Exec = struct { fn compile(ex: *Exec, pat: []const u8, c: u8) Failure!regexp.Regex { return regexp.Regex.compile(pat) catch |err| switch (err) { - error.Anchor => fail(ex.why, "{s}", .{regexp.Regex.e_anchor}), - error.TooLong => fail(ex.why, "{s}", .{regexp.Regex.e_long}), - error.WideRange => fail(ex.why, "{s}", .{regexp.Regex.e_wide}), - error.NegatedRunes => fail(ex.why, "{s}", .{regexp.Regex.e_negated}), - error.Mixed => fail(ex.why, "{s}", .{regexp.Regex.e_mixed}), error.Bad => if (c == '"' or c == 'X' or c == 'Y') fail(ex.why, "bad regexp in file match", .{}) else fail(ex.why, "bad regexp in {c} command", .{c}), + else => fail(ex.why, "{s}", .{regexp.Regex.message(err)}), }; } |
