File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -230,14 +230,26 @@ public void LogRubberduckStart()
230
230
{
231
231
var version = _version . CurrentVersion ;
232
232
GlobalDiagnosticsContext . Set ( "RubberduckVersion" , version . ToString ( ) ) ;
233
+
233
234
var headers = new List < string >
234
235
{
235
236
$ "\r \n \t Rubberduck version { version } loading:",
236
- $ "\t Operating System: { Environment . OSVersion . VersionString } { ( Environment . Is64BitOperatingSystem ? "x64" : "x86" ) } ",
237
- $ "\t Host Product: { Application . ProductName } { ( Environment . Is64BitProcess ? "x64" : "x86" ) } ",
238
- $ "\t Host Version: { Application . ProductVersion } ",
239
- $ "\t Host Executable: { Path . GetFileName ( Application . ExecutablePath ) . ToUpper ( ) } ", // .ToUpper() used to convert ExceL.EXE -> EXCEL.EXE
237
+ $ "\t Operating System: { Environment . OSVersion . VersionString } { ( Environment . Is64BitOperatingSystem ? "x64" : "x86" ) } "
240
238
} ;
239
+ try
240
+ {
241
+ headers . AddRange ( new [ ]
242
+ {
243
+ $ "\t Host Product: { Application . ProductName } { ( Environment . Is64BitProcess ? "x64" : "x86" ) } ",
244
+ $ "\t Host Version: { Application . ProductVersion } ",
245
+ $ "\t Host Executable: { Path . GetFileName ( Application . ExecutablePath ) . ToUpper ( ) } ", // .ToUpper() used to convert ExceL.EXE -> EXCEL.EXE
246
+ } ) ;
247
+ }
248
+ catch
249
+ {
250
+ headers . Add ( "\t Host could not be determined." ) ;
251
+ }
252
+
241
253
LogLevelHelper . SetDebugInfo ( string . Join ( Environment . NewLine , headers ) ) ;
242
254
}
243
255
You can’t perform that action at this time.
0 commit comments