File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
IPR.Hardware.Tools/Hardware/Controller/Dell Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,16 @@ internal sealed class Dell : Hardware
2424 private readonly List < Sensor > _fanSensors = new ( ) ;
2525 private readonly List < Control > _fanControls = new ( ) ;
2626 private DellSmbiosBzh _dellSmb ;
27+ private bool _isInitialized ;
28+ private Exception _failure ;
2729
2830 public Dell ( string boardName ) : base ( nameof ( Dell ) , new Identifier ( nameof ( Dell ) , boardName ) )
2931 {
3032 try
3133 {
3234 _dellSmb = new ( ) ;
33- var initialized = _dellSmb . Initialize ( ) ;
34- if ( ! initialized )
35+ _isInitialized = _dellSmb . Initialize ( ) ;
36+ if ( ! _isInitialized )
3537 return ;
3638
3739 foreach ( var fan in Enum . GetValues ( typeof ( BzhFanIndex ) ) . Cast < BzhFanIndex > ( ) . Select ( ( x , i ) => new { x , i } ) )
@@ -67,7 +69,7 @@ internal sealed class Dell : Hardware
6769 }
6870 catch ( Exception ex )
6971 {
70-
72+ _failure = ex ;
7173 }
7274 }
7375
@@ -82,6 +84,12 @@ public override string GetReport()
8284 r . AppendLine ( "Dell" ) ;
8385 r . AppendLine ( ) ;
8486
87+ if ( ! _isInitialized )
88+ {
89+ r . AppendLine ( "Failed to initialize Dell controller." ) ;
90+ r . AppendLine ( _failure . Message ) ;
91+ }
92+
8593 r . AppendLine ( ) ;
8694 return r . ToString ( ) ;
8795 }
You can’t perform that action at this time.
0 commit comments