Skip to content

Commit f068176

Browse files
authored
Merge pull request #39 from gregurco/console_exception
throw exception if unknown command in used in control console command
2 parents daf7a94 + e25f91f commit f068176

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Command/ControlCommand.php

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
3636
case 'hup':
3737
$handler->hup();
3838
break;
39+
default:
40+
throw new \InvalidArgumentException(sprintf(
41+
'Unknown command. Expected (start|stop|restart|hup), given "%s"', $input->getArgument('cmd')
42+
));
3943
}
4044
}
4145
}

0 commit comments

Comments
 (0)