forked from University/epr24pr5-ojanssen2
fix: fixed not showing correct error message when sending unknown parameter to a subcommand
This commit is contained in:
parent
6d4ae55f2f
commit
12a6ef8adb
3 changed files with 3 additions and 3 deletions
|
@ -31,7 +31,7 @@ namespace commands
|
|||
mgr.add_task(new Task(t));
|
||||
}
|
||||
else
|
||||
throw Error(101, "Befehl ist unbekannt.");
|
||||
throw Error(102, "Ein Parameter eines Befehls konnte nicht gelesen werden.");
|
||||
mgr.save();
|
||||
}
|
||||
} // commands
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace commands
|
|||
else if (data_type == "task")
|
||||
mgr.del_task(id);
|
||||
else
|
||||
throw Error(101, "Befehl ist unbekannt.");
|
||||
throw Error(102, "Ein Parameter eines Befehls konnte nicht gelesen werden");
|
||||
mgr.save();
|
||||
}
|
||||
} // commands
|
||||
|
|
|
@ -31,6 +31,6 @@ namespace commands
|
|||
cout << at;
|
||||
}
|
||||
else
|
||||
throw Error(101, "Befehl ist unbekannt.");
|
||||
throw Error(102, "Ein Parameter eines Befehls konnte nicht gelesen werden");
|
||||
}
|
||||
} // commands
|
||||
|
|
Loading…
Add table
Reference in a new issue