NoClient | NoPlayer(_) | GameBeingDestroyed(_)
=> Status::NotFound,
OE::PieceHeld | OE::PieceImmoveable |
- BadOperation | BadJSON(_)
+ BadJSON(_)
=> Status::BadRequest,
}
}
"activate" => (Enabled, hformat!("enabled {}", CORE_DESC)),
"counting" => (Counting, hformat!("set {} to counting", CORE_DESC)),
"deactivate" => (Disabled, hformat!("disabled {}", CORE_DESC)),
- _ => throw!(OE::BadOperation),
+ _ => throw!(Ia::BadUiOperation),
};
let new_view = match new_state {
PieceHeld, // xxx should be _inapplicable_
#[error("improper UI operation")]
PieceImmoveable, // xxx should be _inapplicable_
- #[error("improper UI operation")]
- BadOperation, // xxx should be _inapplicable_
}
#[derive(Error,Debug)]
#[error("occulter already rotated")] OcculterAlreadyRotated,
#[error("overfull, cannot organise")] OrganisedPlacementOverfull,
#[error("overlapping occultation(s)")] OverlappingOccultation,
+ #[error("UI operation not recognised")] BadUiOperation,
#[error("UI operation not valid in the curret piece state")]
BadPieceStateForOperation,
}
fn ui_operation(&self, _: ShowUnocculted, _a: ApiPieceOpArgs<'_>,
_opname: &str, _wrc: WhatResponseToClientOp)
-> Result<UpdateFromOpComplex, ApiPieceOpError> {
- throw!(OE::BadOperation)
+ throw!(Ia::BadUiOperation)
}
// #[throws] doesn't work here - fehler #todo
throw!(OE::PieceHeld);
}
_ => {
- throw!(OE::BadOperation);
+ throw!(Ia::BadUiOperation);
}
};