mirror of
https://github.com/RGBCube/superfreq
synced 2025-07-28 01:17:45 +00:00
engine: simplify error handling
This commit is contained in:
parent
c1d81b687c
commit
622f4f6f32
1 changed files with 2 additions and 3 deletions
|
@ -23,14 +23,13 @@ where
|
||||||
match apply_fn() {
|
match apply_fn() {
|
||||||
Ok(_) => Ok(()),
|
Ok(_) => Ok(()),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
if matches!(e, ControlError::NotSupported(_))
|
if matches!(e, ControlError::NotSupported(_)) {
|
||||||
|| matches!(e, ControlError::InvalidValueError(_))
|
|
||||||
{
|
|
||||||
warn!(
|
warn!(
|
||||||
"{feature_name} setting is not supported on this system. Skipping {feature_name} configuration."
|
"{feature_name} setting is not supported on this system. Skipping {feature_name} configuration."
|
||||||
);
|
);
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
|
// Propagate all other errors, including InvalidValueError
|
||||||
Err(EngineError::ControlError(e))
|
Err(EngineError::ControlError(e))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue