mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Make top-level features return bool
This commit is contained in:
@@ -110,6 +110,7 @@ namespace RombaSharp
|
||||
|
||||
// Now process the current feature
|
||||
Dictionary<string, Feature> features = _help.GetEnabledFeatures();
|
||||
bool success = false;
|
||||
switch (featureName)
|
||||
{
|
||||
case DisplayHelpDetailed.Value:
|
||||
@@ -128,7 +129,7 @@ namespace RombaSharp
|
||||
case Miss.Value:
|
||||
case RescanDepots.Value:
|
||||
VerifyInputs(feature.Inputs, featureName);
|
||||
feature.ProcessFeatures(features);
|
||||
success = feature.ProcessFeatures(features);
|
||||
break;
|
||||
|
||||
// Requires no input verification
|
||||
@@ -145,7 +146,7 @@ namespace RombaSharp
|
||||
case RefreshDats.Value:
|
||||
case Shutdown.Value:
|
||||
case Features.Version.Value:
|
||||
feature.ProcessFeatures(features);
|
||||
success = feature.ProcessFeatures(features);
|
||||
break;
|
||||
|
||||
// If nothing is set, show the help
|
||||
@@ -154,6 +155,13 @@ namespace RombaSharp
|
||||
break;
|
||||
}
|
||||
|
||||
// If the feature failed, output help
|
||||
if (!success)
|
||||
{
|
||||
logger.Error("An error occurred during processing!");
|
||||
_help.OutputIndividualFeature(featureName);
|
||||
}
|
||||
|
||||
LoggerImpl.Close();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user