File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " tauri " : patch
3+ ---
4+
5+ ` tauri::error::CreateWebview ` now has the error string message attached.
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ use std::path::PathBuf;
88#[ derive( Debug , thiserror:: Error ) ]
99pub enum Error {
1010 /// Failed to create webview.
11- #[ error( "failed to create webview" ) ]
12- CreateWebview ,
11+ #[ error( "failed to create webview: {0} " ) ]
12+ CreateWebview ( String ) ,
1313 /// Failed to create window.
1414 #[ error( "failed to create window" ) ]
1515 CreateWindow ,
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ impl Dispatch for WryDispatcher {
292292 custom_protocols. into_iter ( ) . map ( |( _, p) | p) . collect ( ) ,
293293 file_drop_handler,
294294 )
295- . map_err ( |_ | crate :: Error :: CreateWebview ) ?;
295+ . map_err ( |e | crate :: Error :: CreateWebview ( e . to_string ( ) ) ) ?;
296296
297297 let dispatcher = WryDispatcher {
298298 window,
@@ -466,7 +466,7 @@ impl Runtime for Wry {
466466 type Dispatcher = WryDispatcher ;
467467
468468 fn new ( ) -> crate :: Result < Self > {
469- let app = wry:: Application :: new ( ) . map_err ( |_ | crate :: Error :: CreateWebview ) ?;
469+ let app = wry:: Application :: new ( ) . map_err ( |e | crate :: Error :: CreateWebview ( e . to_string ( ) ) ) ?;
470470 Ok ( Self { inner : app } )
471471 }
472472
@@ -506,7 +506,7 @@ impl Runtime for Wry {
506506 custom_protocols. into_iter ( ) . map ( |( _, p) | p) . collect ( ) ,
507507 file_drop_handler,
508508 )
509- . map_err ( |_ | crate :: Error :: CreateWebview ) ?;
509+ . map_err ( |e | crate :: Error :: CreateWebview ( e . to_string ( ) ) ) ?;
510510
511511 let dispatcher = WryDispatcher {
512512 window,
You can’t perform that action at this time.
0 commit comments