Files
@ 36cc1fe490f7
Branch filter:
Location: CSY/reowolf/src/runtime/error.rs - annotation
36cc1fe490f7
1.8 KiB
application/rls-services+xml
Merge branch 'feat-api-cmds-and-branching'
Implements the programmer-facing API to allow programmatic
specification of a synchronous round. The way in which these put/get
interactions are performed is in an initial shape. Perhaps this will
change in the future.
The second main set of changes is the addion of a 'fork' statement,
which allows explicit forking, and allowing multiple puts/gets over the
same transport link within a single sync round.
Implements the programmer-facing API to allow programmatic
specification of a synchronous round. The way in which these put/get
interactions are performed is in an initial shape. Perhaps this will
change in the future.
The second main set of changes is the addion of a 'fork' statement,
which allows explicit forking, and allowing multiple puts/gets over the
same transport link within a single sync round.
cecf94fdb875 cecf94fdb875 65390fb1cdbc 65390fb1cdbc 65390fb1cdbc 0131beae03dc 9ed6d091a817 65390fb1cdbc 65390fb1cdbc 65390fb1cdbc 65390fb1cdbc 65390fb1cdbc 65390fb1cdbc ada07cee1f99 65390fb1cdbc cecf94fdb875 db17da820a3b db17da820a3b d76b1fe2648f b69f417a9972 db17da820a3b db17da820a3b db17da820a3b db17da820a3b db17da820a3b db17da820a3b db17da820a3b db17da820a3b 65390fb1cdbc 3f6d45f84e76 2a1875efc62c 2a1875efc62c ada07cee1f99 ada07cee1f99 2a1875efc62c 2a1875efc62c 2a1875efc62c cecf94fdb875 8642f7a7bf01 330b9c117fa5 65390fb1cdbc 2a1875efc62c 8ab15200d9a4 8ab15200d9a4 8ab15200d9a4 8ab15200d9a4 8ab15200d9a4 cecf94fdb875 65390fb1cdbc ada07cee1f99 65390fb1cdbc ada07cee1f99 65390fb1cdbc 1e7064d79bdb 1e7064d79bdb 1e7064d79bdb 8ab15200d9a4 1e7064d79bdb 1e7064d79bdb 1e7064d79bdb 1e7064d79bdb 3f6d45f84e76 3f6d45f84e76 3f6d45f84e76 3f6d45f84e76 3f6d45f84e76 3f6d45f84e76 842acacee86d 162c3306c4af 2a1875efc62c 2a1875efc62c 2a1875efc62c 2a1875efc62c 2a1875efc62c 2a1875efc62c | use crate::common::*;
#[derive(Debug)]
pub enum ConnectError {
BindFailed(SocketAddr),
UdpConnectFailed(SocketAddr),
TcpInvalidConnect(SocketAddr),
PollInitFailed,
Timeout,
PollFailed,
AcceptFailed(SocketAddr),
AlreadyConnected,
PortPeerPolarityMismatch(PortId),
NetEndpointSetupError(SocketAddr, NetEndpointError),
SetupAlgMisbehavior,
}
#[derive(Eq, PartialEq, Copy, Clone, Debug)]
pub enum AddComponentError {
DuplicatePort(PortId),
NoSuchModule,
NoSuchComponent,
NonPortTypeParameters,
CannotMovePort(PortId),
WrongNumberOfParamaters { expected: usize },
UnknownPort(PortId),
WrongPortPolarity { port: PortId, expected_polarity: Polarity },
DuplicateMovedPort(PortId),
}
////////////////////////
#[derive(Debug, Clone)]
pub enum UnrecoverableSyncError {
PollFailed,
BrokenNetEndpoint { index: usize },
BrokenUdpEndpoint { index: usize },
MalformedStateError(MalformedStateError),
}
#[derive(Debug, Clone)]
pub enum SyncError {
NotConnected,
InconsistentProtoComponent(ComponentId),
RoundFailure,
Unrecoverable(UnrecoverableSyncError),
}
#[derive(Debug, Clone)]
pub enum MalformedStateError {
PortCannotPut(PortId),
GetterUnknownFor { putter: PortId },
}
#[derive(Debug, Clone)]
pub enum NetEndpointError {
MalformedMessage,
BrokenNetEndpoint,
}
#[derive(Debug)]
pub enum PortOpError {
WrongPolarity,
UnknownPolarity,
NotConnected,
MultipleOpsOnPort,
PortUnavailable,
}
#[derive(Debug, Eq, PartialEq)]
pub enum GottenError {
NoPreviousRound,
PortDidntGet,
PreviousSyncFailed,
}
#[derive(Debug, Eq, PartialEq)]
pub struct WrongStateError;
/////////////////////
impl From<UnrecoverableSyncError> for SyncError {
fn from(e: UnrecoverableSyncError) -> Self {
Self::Unrecoverable(e)
}
}
|