Kaynağa Gözat

feat(cli.js): show full error message (#3442)

Lucas Fernandes Nogueira 3 yıl önce
ebeveyn
işleme
63826010d1

+ 5 - 0
.changes/cli.js-improve-error.md

@@ -0,0 +1,5 @@
+---
+"cli.js": patch
+---
+
+Show full error message from `cli.rs` instead of just the outermost underlying error message.

+ 1 - 1
tooling/cli/node/src/lib.rs

@@ -15,7 +15,7 @@ pub fn run(args: Vec<String>, bin_name: Option<String>, callback: JsFunction) ->
   std::thread::spawn(move || match tauri_cli::run(args, bin_name) {
     Ok(_) => function.call(Ok(true), ThreadsafeFunctionCallMode::Blocking),
     Err(e) => function.call(
-      Err(Error::new(Status::GenericFailure, e.to_string())),
+      Err(Error::new(Status::GenericFailure, format!("{:#}", e))),
       ThreadsafeFunctionCallMode::Blocking,
     ),
   });