Pārlūkot izejas kodu

Properly forward message based errors when quitting program

timvisee 7 gadi atpakaļ
vecāks
revīzija
a4b7736019
1 mainītis faili ar 1 papildinājumiem un 8 dzēšanām
  1. 1 8
      cli/src/util.rs

+ 1 - 8
cli/src/util.rs

@@ -30,14 +30,7 @@ pub fn quit_error_msg<S>(err: S) -> !
     where
     where
         S: AsRef<str> + Display + Debug + Sync + Send + 'static
         S: AsRef<str> + Display + Debug + Sync + Send + 'static
 {
 {
-    // TODO: forward the error the `quit_error` here
-    // quit_error(failure::err_msg(err));
-
-    // Print the error message
-    eprintln!("error: {}", err);
-
-    // Quit
-    exit(1);
+    quit_error(failure::err_msg(err).compat());
 }
 }
 
 
 /// Open the given URL in the users default browser.
 /// Open the given URL in the users default browser.