File tree 2 files changed +17
-8
lines changed 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ public static AppBuilder BuildAvaloniaApp()
78
78
return builder ;
79
79
}
80
80
81
- private static void LogException ( Exception ex )
81
+ public static void LogException ( Exception ex )
82
82
{
83
83
if ( ex == null )
84
84
return ;
Original file line number Diff line number Diff line change @@ -100,23 +100,32 @@ public void StartPopup(Popup popup)
100
100
101
101
public async void ProcessPopup ( )
102
102
{
103
- if ( _popup is { InProgress : false } )
103
+ if ( _popup is { InProgress : false } dump )
104
104
{
105
- if ( ! _popup . Check ( ) )
105
+ if ( ! dump . Check ( ) )
106
106
return ;
107
107
108
- _popup . InProgress = true ;
109
- var task = _popup . Sure ( ) ;
108
+ dump . InProgress = true ;
109
+ var task = dump . Sure ( ) ;
110
+ var finished = false ;
110
111
if ( task != null )
111
112
{
112
- var finished = await task ;
113
- _popup . InProgress = false ;
113
+ try
114
+ {
115
+ finished = await task ;
116
+ }
117
+ catch ( Exception e )
118
+ {
119
+ App . LogException ( e ) ;
120
+ }
121
+
122
+ dump . InProgress = false ;
114
123
if ( finished )
115
124
Popup = null ;
116
125
}
117
126
else
118
127
{
119
- _popup . InProgress = false ;
128
+ dump . InProgress = false ;
120
129
Popup = null ;
121
130
}
122
131
}
You can’t perform that action at this time.
0 commit comments