feat(build): print error context (#3644)

This commit is contained in:
Lucas Fernandes Nogueira 2022-03-09 21:01:26 -03:00 committed by GitHub
parent b3515014ef
commit 49546c5269
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 21 additions and 16 deletions

View File

@ -0,0 +1,5 @@
---
"tauri-build": patch
---
Print error context on the `build` panic.

View File

@ -143,7 +143,7 @@ impl Attributes {
/// This is typically desirable when running inside a build script; see [`try_build`] for no panics. /// This is typically desirable when running inside a build script; see [`try_build`] for no panics.
pub fn build() { pub fn build() {
if let Err(error) = try_build(Attributes::default()) { if let Err(error) = try_build(Attributes::default()) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }

View File

@ -9,6 +9,6 @@ fn main() {
Attributes::new() Attributes::new()
.windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")), .windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")),
) { ) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }

View File

@ -9,6 +9,6 @@ fn main() {
Attributes::new() Attributes::new()
.windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")), .windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")),
) { ) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }

View File

@ -9,6 +9,6 @@ fn main() {
Attributes::new() Attributes::new()
.windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")), .windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")),
) { ) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }

View File

@ -9,6 +9,6 @@ fn main() {
Attributes::new() Attributes::new()
.windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")), .windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")),
) { ) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }

View File

@ -9,6 +9,6 @@ fn main() {
Attributes::new() Attributes::new()
.windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")), .windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")),
) { ) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }

View File

@ -9,6 +9,6 @@ fn main() {
Attributes::new() Attributes::new()
.windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")), .windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")),
) { ) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }

View File

@ -9,6 +9,6 @@ fn main() {
Attributes::new() Attributes::new()
.windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")), .windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")),
) { ) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }

View File

@ -9,6 +9,6 @@ fn main() {
Attributes::new() Attributes::new()
.windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")), .windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")),
) { ) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }

View File

@ -9,6 +9,6 @@ fn main() {
Attributes::new() Attributes::new()
.windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")), .windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")),
) { ) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }

View File

@ -9,6 +9,6 @@ fn main() {
Attributes::new() Attributes::new()
.windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")), .windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")),
) { ) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }

View File

@ -9,6 +9,6 @@ fn main() {
Attributes::new() Attributes::new()
.windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")), .windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")),
) { ) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }

View File

@ -9,6 +9,6 @@ fn main() {
Attributes::new() Attributes::new()
.windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")), .windows_attributes(WindowsAttributes::new().window_icon_path("../../.icons/icon.ico")),
) { ) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }

View File

@ -8,6 +8,6 @@ fn main() {
if let Err(error) = try_build(Attributes::new().windows_attributes( if let Err(error) = try_build(Attributes::new().windows_attributes(
WindowsAttributes::new().window_icon_path("../../../../../examples/.icons/icon.ico"), WindowsAttributes::new().window_icon_path("../../../../../examples/.icons/icon.ico"),
)) { )) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }

View File

@ -8,6 +8,6 @@ fn main() {
if let Err(error) = try_build(Attributes::new().windows_attributes( if let Err(error) = try_build(Attributes::new().windows_attributes(
WindowsAttributes::new().window_icon_path("../../../../../examples/.icons/icon.ico"), WindowsAttributes::new().window_icon_path("../../../../../examples/.icons/icon.ico"),
)) { )) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }

View File

@ -8,6 +8,6 @@ fn main() {
if let Err(error) = try_build(Attributes::new().windows_attributes( if let Err(error) = try_build(Attributes::new().windows_attributes(
WindowsAttributes::new().window_icon_path("../../../../../examples/.icons/icon.ico"), WindowsAttributes::new().window_icon_path("../../../../../examples/.icons/icon.ico"),
)) { )) {
panic!("error found during tauri-build: {}", error); panic!("error found during tauri-build: {:#?}", error);
} }
} }