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
BH.Engine.Base.Compute.RecordWarning($"Could not find settings of type {type} loaded in memory. Returning a default instance of the settings object instead.");
44
-
returnActivator.CreateInstance(type);
44
+
ISettingsobj=null;
45
+
try
46
+
{
47
+
varactivator=Activator.CreateInstance(type);
48
+
49
+
try
50
+
{
51
+
obj=activatorasISettings;
52
+
}
53
+
catch(Exceptionex)
54
+
{
55
+
BH.Engine.Base.Compute.RecordError(ex,$"Could not cast object of type {activator.GetType()} to an ISettings object. Settings not saved in memory.");
56
+
returnactivator;
57
+
}
58
+
}
59
+
catch(Exceptionex)
60
+
{
61
+
BH.Engine.Base.Compute.RecordError(ex,$"Could not create instance of object of type {type}.");
0 commit comments