fix: fixed not showing correct error message when sending unknown parameter to a subcommand

This commit is contained in:
moonleay 2025-02-09 21:33:42 +01:00
parent 6d4ae55f2f
commit 12a6ef8adb
Signed by: moonleay
GPG key ID: 82667543CCD715FB
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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

View file

@ -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