mirror of
https://github.com/Yet-Another-DreamTeam/quicknote.git
synced 2026-03-13 00:07:25 +00:00
if argc < 2 throw ParameterException
This commit is contained in:
parent
15b2eb2fc0
commit
52fe8fa52f
@ -43,6 +43,14 @@ public:
|
||||
|
||||
void execute(int argc, char *argv[])
|
||||
{
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
std::cout << "Command not found" << std::endl;
|
||||
throw lpstd::exceptions::ParameterException("argc < 2");
|
||||
return;
|
||||
}
|
||||
|
||||
std::string command = argv[1];
|
||||
std::vector<std::string> args;
|
||||
for (int i = 2; i < argc; i++)
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
using namespace lpstd::exceptions;
|
||||
|
||||
namespace commands
|
||||
namespace commands
|
||||
{
|
||||
void add(int argc, char *argv[])
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user