Skip to content

Commit cbf6348

Browse files
server: panic if sendInspector without an inspector
Signed-off-by: Francis Bouvier <[email protected]>
1 parent ec68059 commit cbf6348

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ pub const Ctx = struct {
315315
pub fn sendInspector(self: *Ctx, msg: []const u8) void {
316316
if (self.env().getInspector()) |inspector| {
317317
inspector.send(self.env(), msg);
318-
}
318+
} else @panic("Inspector has not been set");
319319
}
320320

321321
inline fn inspectorCtx(ctx_opaque: *anyopaque) *Ctx {

0 commit comments

Comments
 (0)