Skip to main content

tokio_cast/
error.rs

1use thiserror::Error;
2
3/// Errors produced by the tokio-cast library.
4#[derive(Debug, Error)]
5pub enum TokioCastError {
6    #[error("configuration error: {0}")]
7    Config(String),
8
9    #[error("parse error: {0}")]
10    Parse(String),
11
12    #[error("unsupported language: {0}")]
13    UnsupportedLanguage(String),
14
15    #[error(transparent)]
16    Io(#[from] std::io::Error),
17
18    #[error("actor error: {0}")]
19    Actor(#[from] tokio_actors::ActorError),
20
21    #[error("send error: {0}")]
22    Send(#[from] tokio_actors::SendError),
23
24    #[error("ask error: {0}")]
25    Ask(#[from] tokio_actors::AskError),
26
27    #[error("spawn error: {0}")]
28    Spawn(#[from] tokio_actors::SpawnError),
29}