aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authorr00ster91 <r00ster91@proton.me>2022-10-31 19:43:41 +0100
committerr00ster91 <r00ster91@proton.me>2022-12-13 09:11:30 +0100
commit7561f63b5d93fb32b39410590625bb16bf2ac0dd (patch)
tree1f3323f8654227d2b0b23ef677aa4342cbd0b867 /lib/std/debug.zig
parentd0d845a25b897a8db37b0f60d5ec313f6b56943f (diff)
downloadzig-7561f63b5d93fb32b39410590625bb16bf2ac0dd.tar.gz
zig-7561f63b5d93fb32b39410590625bb16bf2ac0dd.zip
std.debug: use OpenSelfDebugInfoError
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index da78d4ee95..c48324422d 100644
--- a/lib/std/debug.zig
+++ b/lib/std/debug.zig
@@ -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,
}
}
}