There is no reason to initialize valid and then immediately overwrite it. The variable is also unnecessary.
The initial check that prints the warning "something went wrong parsing the action input." prevents all other checks from happening. These other checks provide more detailed error reporting. Simplify this check and change the error message to only report a warning when no registered actions were found.
Remove useless and redundant checks.
Add additional checks for when parts are empty.
Many of the more detailed checks are pointless.
One of the entire if blocks appears bogus.
The parts[0] is used to get the registered actions.
This should not be a part of its own actions.
Fix grammar in error messages.
With this change, more useful error messages appear.
Examples:
No registered actions were found for 'Store.Action'.
There is no reason to initialize valid and then immediately overwrite it. The variable is also unnecessary.
The initial check that prints the warning "something went wrong parsing the action input." prevents all other checks from happening. These other checks provide more detailed error reporting. Simplify this check and change the error message to only report a warning when no registered actions were found.
Remove useless and redundant checks. Add additional checks for when parts are empty. Many of the more detailed checks are pointless.
One of the entire if blocks appears bogus. The
parts[0]
is used to get the registered actions. This should not be a part of its own actions.Fix grammar in error messages.
With this change, more useful error messages appear. Examples:
Rather than this: