{"record":{"id":"4bb3d0a1533d54d8","repo":"zellij-org/zellij","slug":"program-terminates","errorCode":null,"errorMessage":"Program terminates","messagePattern":"Program terminates","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"zellij-utils/src/errors.rs","lineNumber":160,"sourceCode":"}\n\n/// Helper function to silence `#[warn(unused_must_use)]` cargo warnings. Used exclusively in\n/// `FatalError::non_fatal`!\nfn discard_result<T>(_arg: anyhow::Result<T>) {}\n\nimpl<T> FatalError<T> for anyhow::Result<T> {\n    fn non_fatal(self) {\n        if self.is_err() {\n            discard_result(self.context(\"a non-fatal error occured\").to_log());\n        }\n    }\n\n    fn fatal(self) -> T {\n        if let Ok(val) = self {\n            val\n        } else {\n            self.context(\"a fatal error occured\")\n                .expect(\"Program terminates\")\n        }\n    }\n}\n\n/// Different types of calls that form an [`ErrorContext`] call stack.\n///\n/// Complex variants store a variant of a related enum, whose variants can be built from\n/// the corresponding Zellij MSPC instruction enum variants ([`ScreenInstruction`],\n/// [`PtyInstruction`], [`ClientInstruction`], etc).\n#[derive(Copy, Clone, PartialEq, Serialize, Deserialize, Debug)]\npub enum ContextType {\n    /// A screen-related call.\n    Screen(ScreenContext),\n    /// A PTY-related call.\n    Pty(PtyContext),\n    /// A plugin-related call.\n    Plugin(PluginContext),\n    /// An app-related call.","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/zellij-org/zellij/blob/5cb5df5cce4e16c5d1c57c7c062e4a90a7823c41/zellij-utils/src/errors.rs#L142-L178","documentation":"Error \"Program terminates\" thrown in zellij-org/zellij.","triggerScenarios":"Occurs at zellij-utils/src/errors.rs:160 when the operation fails: \"Program terminates\". Currently there is no defensive handling preventing or contextualizing this failure before it surfaces.","commonSituations":"Appears at the end of any fatal error path; not a root cause by itself.","solutions":["Check preceding log lines for the root cause; this is the generic termination marker.","Run with increased logging (zellij --debug) to find the originating error."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5cb5df5cce4e16c5d1c57c7c062e4a90a7823c41","analyzedAt":"2026-08-19T07:42:58.758Z","contentChangedAt":"2026-08-19T07:42:58.758Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}