std.debug: use OpenSelfDebugInfoError

This commit is contained in:
r00ster91
2022-10-31 19:43:41 +01:00
parent d0d845a25b
commit 7561f63b5d

View File

@@ -761,14 +761,12 @@ fn printLineInfo(
}
}
// TODO use this
pub const OpenSelfDebugInfoError = error{
MissingDebugInfo,
OutOfMemory,
UnsupportedOperatingSystem,
};
pub fn openSelfDebugInfo(allocator: mem.Allocator) anyerror!DebugInfo {
pub fn openSelfDebugInfo(allocator: mem.Allocator) OpenSelfDebugInfoError!DebugInfo {
nosuspend {
if (builtin.strip_debug_info)
return error.MissingDebugInfo;
@@ -785,7 +783,7 @@ pub fn openSelfDebugInfo(allocator: mem.Allocator) anyerror!DebugInfo {
.windows,
.solaris,
=> return DebugInfo.init(allocator),
else => return error.UnsupportedDebugInfo,
else => return error.UnsupportedOperatingSystem,
}
}
}