Feature: Extra arg detection
- Commands that do not accept filters or modifications now generate an error when extra arguments are specified.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include <cmake.h>
|
||||
#include <CmdLogo.h>
|
||||
#include <Context.h>
|
||||
#include <Filter.h>
|
||||
#include <text.h>
|
||||
#include <i18n.h>
|
||||
|
||||
@@ -50,6 +51,12 @@ CmdLogo::CmdLogo ()
|
||||
// extension.<uuid>=<JSON>
|
||||
int CmdLogo::execute (std::string& output)
|
||||
{
|
||||
Filter filter;
|
||||
if (filter.hasFilter ())
|
||||
throw std::string (STRING_ERROR_NO_FILTER);
|
||||
if (filter.hasModifications ())
|
||||
throw std::string (STRING_ERROR_NO_MODS);
|
||||
|
||||
static const char* data[] =
|
||||
{
|
||||
".........ABDEF",
|
||||
|
||||
Reference in New Issue
Block a user