소스 검색

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

Lucas Fernandes Nogueira 3 년 전
부모
커밋
63826010d1
2개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 0
      .changes/cli.js-improve-error.md
  2. 1 1
      tooling/cli/node/src/lib.rs

+ 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,
     ),
   });