diff --git a/lib/std/debug.zig b/lib/std/debug.zig index 3ce9f3c1d32c722927e728c092c9e0299a884b64..5e217890b79289218c6156b4da6997f4d9d05639 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -864,7 +864,10 @@ fn readCoffDebugInfo(allocator: mem.Allocator, coff_file: File) !ModuleDebugInfo defer allocator.free(path); di.debug_data = PdbOrDwarf{ .pdb = undefined }; - di.debug_data.pdb = try pdb.Pdb.init(allocator, path); + di.debug_data.pdb = pdb.Pdb.init(allocator, path) catch |err| switch (err) { + error.FileNotFound, error.IsDir => return error.MissingDebugInfo, + else => return err, + }; try di.debug_data.pdb.parseInfoStream(); try di.debug_data.pdb.parseDbiStream();