Skip to content

Commit fc94cb2

Browse files
Merge pull request #6 from software-artificer/better-errors
Improve error messages printed by main function
2 parents 685cd01 + 6659d40 commit fc94cb2

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

config.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
listen_on: 127.0.0.1:9753
3-
worlds_path: /tmp/nix-shell.Bihv8S/tmp.YDoMbAsiBf
3+
worlds_path: /var/lib/minecraft/worlds
44
current_world_name: current_world
55
server_socket_path: /run/minecraft/minecraft.socket
6-
users_file_path: ./users.yaml
6+
users_file_path: /var/lib/minecraft/users.yml
77
base_url: http://127.0.0.1:9753/
88
min_password_length: 10
99
max_password_length: 128
10-
server_properties_path: ./server.properties

src/main.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,13 @@ fn main() {
9898
let args = Args::parse();
9999

100100
if let Err(err) = real_main(args) {
101-
tracing::error!("{err}");
101+
tracing::error!(
102+
"{}",
103+
err.chain()
104+
.map(|err| err.to_string())
105+
.collect::<Vec<_>>()
106+
.join(": ")
107+
);
102108

103109
std::process::exit(1);
104110
}

0 commit comments

Comments
 (0)