starlang_runtime/
error.rs1use starlang_core::Pid;
4use thiserror::Error;
5
6#[derive(Debug, Error)]
8pub enum RuntimeError {
9 #[error("process not found: {0}")]
11 ProcessNotFound(Pid),
12
13 #[error("send failed: {0}")]
15 SendFailed(#[from] SendError),
16
17 #[error("spawn failed: {0}")]
19 SpawnFailed(#[from] SpawnError),
20}
21
22#[derive(Debug, Error)]
24pub enum SendError {
25 #[error("process not found: {0}")]
27 ProcessNotFound(Pid),
28
29 #[error("mailbox full")]
31 MailboxFull,
32
33 #[error("process terminated")]
35 ProcessTerminated,
36}
37
38#[derive(Debug, Error)]
40pub enum SpawnError {
41 #[error("failed to create process task: {0}")]
43 TaskCreationFailed(String),
44
45 #[error("process initialization failed: {0}")]
47 InitFailed(String),
48}