File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed
Assets/Plugins/CandyCoded.GitStatus/Scripts/CustomEditor Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,18 @@ private static string GetSelectedPath()
25
25
private static async void DiscardChanges ( )
26
26
{
27
27
28
- await Git . DiscardChanges ( GetSelectedPath ( ) ) ;
28
+ try
29
+ {
30
+
31
+ await Git . DiscardChanges ( GetSelectedPath ( ) ) ;
32
+
33
+ }
34
+ catch ( Exception error )
35
+ {
36
+
37
+ EditorUtility . DisplayDialog ( "Error" , error . Message , "Ok" ) ;
38
+
39
+ }
29
40
30
41
}
31
42
@@ -49,8 +60,18 @@ private static async void DiscardAllChanges()
49
60
"Yes" ,
50
61
"Cancel" ) )
51
62
{
63
+ try
64
+ {
52
65
53
- await Git . DiscardChanges ( GetSelectedPath ( ) ) ;
66
+ await Git . DiscardChanges ( GetSelectedPath ( ) ) ;
67
+
68
+ }
69
+ catch ( Exception error )
70
+ {
71
+
72
+ EditorUtility . DisplayDialog ( "Error" , error . Message , "Ok" ) ;
73
+
74
+ }
54
75
55
76
}
56
77
You can’t perform that action at this time.
0 commit comments