Rework some error types
This commit is contained in:
@@ -21,6 +21,7 @@ byteorder = "1.4.3"
|
||||
async-channel = "1.9.0"
|
||||
rand_xoshiro = "0.6.0"
|
||||
thiserror = "=0.0.1"
|
||||
autoerr = "0.0.3"
|
||||
chrono = { version = "0.4.19", features = ["serde"] }
|
||||
netpod = { path = "../../../daqbuf-netpod", package = "daqbuf-netpod" }
|
||||
query = { path = "../../../daqbuf-query", package = "daqbuf-query" }
|
||||
|
||||
@@ -25,14 +25,15 @@ use streams::tcprawclient::HttpSimplePost;
|
||||
use tokio::io::AsyncWriteExt;
|
||||
use tokio::net::TcpStream;
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
#[cstm(name = "TcpRawClient")]
|
||||
pub enum Error {
|
||||
IO(#[from] std::io::Error),
|
||||
Frame(#[from] items_2::frame::Error),
|
||||
Framable(#[from] items_2::framable::Error),
|
||||
StreamsRawClient(#[from] streams::tcprawclient::Error),
|
||||
}
|
||||
autoerr::create_error_v1!(
|
||||
name(Error, "TcpRawClient"),
|
||||
enum variants {
|
||||
IO(#[from] std::io::Error),
|
||||
Frame(#[from] items_2::frame::Error),
|
||||
Framable(#[from] items_2::framable::Error),
|
||||
StreamsRawClient(#[from] streams::tcprawclient::Error),
|
||||
},
|
||||
);
|
||||
|
||||
pub type BoxedStream<T> = Pin<Box<dyn Stream<Item = Sitemty<T>> + Send>>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user