File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1- using System ;
1+ using FreeControl . Utils ;
2+ using System ;
23using System . Collections . Generic ;
34using System . Linq ;
45using System . Reflection ;
@@ -18,7 +19,19 @@ static void Main()
1819
1920 Application . EnableVisualStyles ( ) ;
2021 Application . SetCompatibleTextRenderingDefault ( false ) ;
21- Application . Run ( new Trusteeship ( ) ) ;
22+ try
23+ {
24+ Application . Run ( new Trusteeship ( ) ) ;
25+ }
26+ catch ( Exception ex )
27+ {
28+ Logger . Error ( ex ) ;
29+ DialogResult dr = MessageBox . Show ( "启动失败!是否要向开发者反馈此问题?" , "提示" , MessageBoxButtons . OKCancel ) ;
30+ if ( dr == DialogResult . OK )
31+ {
32+ System . Diagnostics . Process . Start ( "https://github.com/pdone/FreeControl/issues" ) ;
33+ }
34+ }
2235 }
2336 private static Assembly CurrentDomain_AssemblyResolve ( object sender , ResolveEventArgs args )
2437 {
Original file line number Diff line number Diff line change @@ -77,6 +77,10 @@ public static void SetPathAfter(string strHome)
7777 {
7878 string pathlist ;
7979 pathlist = GetSysEnvironmentByName ( "PATH" ) ;
80+ if ( string . IsNullOrWhiteSpace ( pathlist ) )
81+ {
82+ return ;
83+ }
8084 //检测是否以;结尾
8185 if ( pathlist . Substring ( pathlist . Length - 1 , 1 ) != ";" )
8286 {
You can’t perform that action at this time.
0 commit comments