Improve error cases
This commit is contained in:
parent
d57ec784f1
commit
5d73e0d5ce
@ -54,7 +54,7 @@ impl Bot {
|
|||||||
.expect("No characters to select")
|
.expect("No characters to select")
|
||||||
.character
|
.character
|
||||||
.id
|
.id
|
||||||
.unwrap();
|
.expect("Failed to get character ID");
|
||||||
|
|
||||||
self.client.request_character(
|
self.client.request_character(
|
||||||
character_id,
|
character_id,
|
||||||
@ -71,7 +71,7 @@ impl Bot {
|
|||||||
let events = self
|
let events = self
|
||||||
.client
|
.client
|
||||||
.tick(ControllerInputs::default(), self.clock.dt())
|
.tick(ControllerInputs::default(), self.clock.dt())
|
||||||
.expect("Failed to run client.");
|
.map_err(|error| format!("{error:?}"))?;
|
||||||
|
|
||||||
for event in events {
|
for event in events {
|
||||||
self.handle_event(event)?;
|
self.handle_event(event)?;
|
||||||
|
Loading…
Reference in New Issue
Block a user