Skip to content

Commit 4c652dc

Browse files
committed
improve error message when grsesource file not found
1 parent 8facae9 commit 4c652dc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,8 @@ fn main() {
7474
env_logger::init();
7575

7676
let resources = match env::var("MESON_DEVENV") {
77-
Err(_) => {
78-
gio::Resource::load(config::RESOURCES_FILE).expect("Unable to load resources.gresource")
79-
}
77+
Err(_) => gio::Resource::load(config::RESOURCES_FILE)
78+
.unwrap_or_else(|_| panic!("Unable to load {}", config::RESOURCES_FILE)),
8079
Ok(_) => match env::current_exe() {
8180
Ok(path) => {
8281
let mut resource_path = path;

0 commit comments

Comments
 (0)