You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -467,9 +467,7 @@ public static DnaLibrary LoadFrom(Uri uri)
467
467
}
468
468
catch(Exceptione)
469
469
{
470
-
stringerrorMessage=string.Format("There was an error in loading the .dna file from a Uri:\r\n{0}\r\n{1}\r\nUri:{2}",e.Message,e.InnerException!=null?e.InnerException.Message:string.Empty,uri.ToString());
Logger.Initialization.Error("There was an error in loading the .dna file from a Uri:\r\n{0}\r\n{1}\r\nUri:{2}",e.Message,e.InnerException!=null?e.InnerException.Message:string.Empty,uri.ToString());
stringerrorMessage=string.Format("There was an error in processing .dna file bytes:\r\n{0}\r\n{1}",e.Message,e.InnerException!=null?e.InnerException.Message:string.Empty);
Logger.Initialization.Error("There was an error in processing .dna file bytes:\r\n{0}\r\n{1}",e.Message,e.InnerException!=null?e.InnerException.Message:string.Empty);
498
494
returnnull;
499
495
}
500
496
dnaLibrary.dnaResolveRoot=pathResolveRoot;
@@ -507,7 +503,7 @@ public static DnaLibrary LoadFrom(string fileName)
507
503
508
504
if(!File.Exists(fileName))
509
505
{
510
-
ExcelDna.Logging.LogDisplay.WriteLine("The required .dna script file {0} does not exist.",fileName);
506
+
Logger.Initialization.Error("The required .dna script file {0} does not exist.",fileName);
511
507
returnnull;
512
508
}
513
509
@@ -521,7 +517,7 @@ public static DnaLibrary LoadFrom(string fileName)
521
517
}
522
518
catch(Exceptione)
523
519
{
524
-
ExcelDna.Logging.LogDisplay.WriteLine("There was an error during processing of {0}:\r\n{1}\r\n{2}",fileName,e.Message,e.InnerException!=null?e.InnerException.Message:string.Empty);
520
+
Logger.Initialization.Error("There was an error during processing of {0}:\r\n{1}\r\n{2}",fileName,e.Message,e.InnerException!=null?e.InnerException.Message:string.Empty);
@@ -100,10 +100,10 @@ public static void LoadComAddIn(ExcelComAddIn addIn)
100
100
stringdescription=string.Format("Dynamically created COM Add-in to load custom UI for the Excel Add-in {0}, located at {1}.",addIn.DnaLibrary.Name,DnaLibrary.XllPath);
@@ -134,8 +134,7 @@ public static void LoadComAddIn(ExcelComAddIn addIn)
134
134
}
135
135
catch(UnauthorizedAccessExceptionsecex)
136
136
{
137
-
Logging.LogDisplay.WriteLine("The Ribbon/COM Add-in helper required by add-in {0} could not be registered.\r\nThis may be due to restricted permissions on the user's HKCU\\Software\\Classes key.\r\nError message: {1}",DnaLibrary.CurrentLibrary.Name,secex.Message);
Logger.ComAddIn.Error(secex,"The Ribbon/COM add-in helper required by add-in {0} could not be registered.\r\nThis may be due to restricted permissions on the user's HKCU\\Software\\Classes key.",DnaLibrary.CurrentLibrary.Name);
139
138
}
140
139
catch(Exceptionex)
141
140
{
@@ -145,9 +144,9 @@ public static void LoadComAddIn(ExcelComAddIn addIn)
145
144
// CONSIDER: How would an add-in know that its COM AddIn load failed in this case?
146
145
if(!Environment.CommandLine.Contains(" /K"))
147
146
{
148
-
Logging.LogDisplay.WriteLine("The Ribbon/COM Add-in helper required by add-in {0} could not be registered.\r\nThis is an unexpected error.\r\nError message: {1}",DnaLibrary.CurrentLibrary.Name,ex.Message);
147
+
Logger.ComAddIn.Error("The Ribbon/COM add-in helper required by add-in {0} could not be registered.\r\nThis is an unexpected error.",DnaLibrary.CurrentLibrary.Name);
0 commit comments