}
impl<'r, Id> FromFormValue<'r> for InstanceAccess<'r, Id>
- where Id: AccessId, OE: From<Id::Error>
+ where Id: AccessId, Fatal: From<Id::Error>
{
type Error = OER;
#[throws(OER)]
}
}
-#[throws(OE)]
+#[throws(Fatal)]
fn api_piece_op<O: op::Complex>(form: Json<ApiPiece<O>>)
-> impl response::Responder<'static> {
// thread::sleep(Duration::from_millis(2000));
prepub.finish();
}
- Ok::<(),OE>(())
+ Ok::<(),Fatal>(())
})();
let g = &mut *ig;
loading(Some((layout.0).0), ia)?
}
-#[throws(OE)]
+#[throws(Fatal)]
fn loading(layout: Option<PresentationLayout>, ia: PlayerQueryString)
-> Template
{
fn session_inner(form: Json<SessionForm>,
layout: Option<PresentationLayout>)
- -> Result<Template,OE> {
+ -> Result<Template,Fatal> {
// make session in this game, log a message to other players
let iad = lookup_token(form.ptoken.borrow())?;
let player = iad.ident;
// ---------- Player and token functionality ----------
impl<Id> InstanceAccessDetails<Id>
- where Id: AccessId, OE: From<Id::Error>
+ where Id: AccessId, Fatal: From<Id::Error>
{
- #[throws(OE)]
+ #[throws(Fatal)]
pub fn from_token(token: &RawTokenVal) -> InstanceAccessDetails<Id> {
let g = Id::global_tokens(PRIVATE_Y).read();
let i = g.get(token).ok_or(Id::ERROR)?;
.ok_or(Id::ERROR)
}
-#[throws(OE)]
+#[throws(Fatal)]
pub fn record_token<Id:AccessId> (
ig: &mut InstanceGuard,
iad: InstanceAccessDetails<Id>
pub type APOE = ApiPieceOpError;
pub type ESVU<POEPU> = ErrorSignaledViaUpdate<POEPU>;
pub type IE = InternalError;
-pub type OE = Fatal; // xxx get rid of this alyas when we've cleaned up Fatal
pub type Ia = Inapplicable;
pub type POEPP = PieceOpErrorPartiallyProcessed;
pub type SvgE = SVGProcessingError;
// ---------- entrypoint for dribbling the http response ----------
-#[throws(OE)]
+#[throws(Fatal)]
pub fn content(iad: InstanceAccessDetails<ClientId>, gen: Generation)
-> impl Read {
let client = iad.ident;
// ---------- helpful utilities ----------
-#[throws(OE)]
+#[throws(Fatal)]
pub fn log_did_to_piece_whoby(ioccults: &IOccults, goccults: &GameOccults,
by_gpl: &GPlayer,
gpc: &GPiece, ipc: &IPiece, did: &str)
(log, Some(who_by))
}
-#[throws(OE)]
+#[throws(Fatal)]
pub fn log_did_to_piece(ioccults: &IOccults, goccults: &GameOccults,
by_gpl: &GPlayer,
gpc: &GPiece, ipc: &IPiece, did: &str)
logents: Vec<LogEntry>,
partially: PieceOpErrorPartiallyProcessed,
client: ClientId, cseq: ClientSequence)
- -> Result<(),OE> {
+ -> Result<(),Fatal> {
let by_client = (WRC::Unpredictable, client, cseq);
let mut buf = PrepareUpdatesBuffer::new(ig, None);
let ops = PUOs::Simple(PieceUpdateOp::Modify(()));