aboutsummaryrefslogtreecommitdiffstats
path: root/src/errors.rs
diff options
context:
space:
mode:
authorTeddy Wing2018-10-20 16:46:46 +0200
committerTeddy Wing2018-10-20 16:46:46 +0200
commit2e79762f80e55c9f0897fafc0f5499060343217f (patch)
treef58631214d1f2a9abddb9bd612a1736ccd6b19c3 /src/errors.rs
parent56e02991a4577b99dbb5d1b73802b768bdaadd1b (diff)
downloaddome-key-map-2e79762f80e55c9f0897fafc0f5499060343217f.tar.bz2
read_config_file(): Update to get the config from `config.toml`
Use XDG handling from `state_load_map_group()` to do basically the same thing here for reading the config from a `config.toml` file. Use 'error-chain' to handle the `Result`s more easily. No more nested pattern matching, we'll just have to unwrap one `Result` and write the error to stderr in an FFI function.
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/errors.rs b/src/errors.rs
new file mode 100644
index 0000000..beafc9f
--- /dev/null
+++ b/src/errors.rs
@@ -0,0 +1,7 @@
+use xdg;
+
+error_chain! {
+ foreign_links {
+ Xdg(xdg::BaseDirectoriesError);
+ }
+}