refactor: bubble up error handling so that standard exit codes can be set at the top-level
LogFail shouldn't be called internally if at all possible.
This commit is contained in:
@@ -88,7 +88,7 @@ func main() {
|
||||
appName := args.Arg(0)
|
||||
err = resource.CommandReserveClear(appName, *processType)
|
||||
default:
|
||||
common.LogFail(fmt.Sprintf("Invalid plugin subcommand call: %s", subcommand))
|
||||
err = fmt.Errorf("Invalid plugin subcommand call: %s", subcommand)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -45,7 +45,7 @@ func main() {
|
||||
key := flag.Arg(3)
|
||||
err = resource.TriggerResourceGetProperty(appName, processType, resourceType, key)
|
||||
default:
|
||||
common.LogFail(fmt.Sprintf("Invalid plugin trigger call: %s", trigger))
|
||||
err = fmt.Errorf("Invalid plugin trigger call: %s", trigger)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user