rlbot/error.rs
1use crate::ffi::RLBotCoreStatus;
2use std::{error::Error, fmt};
3
4/// An error code from the RLBot interface.
5#[derive(Debug)]
6pub struct RLBotError {
7 pub status: RLBotCoreStatus,
8}
9
10impl Error for RLBotError {}
11
12impl fmt::Display for RLBotError {
13 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
14 write!(f, "RLBotError({:?})", self.status)
15 }
16}