feat: use explicit error handling for all startup errors
This commit is contained in:
parent
fc3224137d
commit
a1b2737c5d
12 changed files with 116 additions and 50 deletions
|
@ -16,7 +16,7 @@ pub const Selection = struct {
|
|||
end: Cursor = Cursor{},
|
||||
};
|
||||
|
||||
pub fn create() !Self {
|
||||
pub fn create() error{ OutOfMemory, ThespianSpawnFailed }!Self {
|
||||
return .{ .pid = try Process.create() };
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ const Process = struct {
|
|||
selection: ?Selection = null,
|
||||
};
|
||||
|
||||
pub fn create() !tp.pid {
|
||||
pub fn create() error{ OutOfMemory, ThespianSpawnFailed }!tp.pid {
|
||||
const self = try outer_a.create(Process);
|
||||
self.* = .{
|
||||
.arena = std.heap.ArenaAllocator.init(outer_a),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue