Handle failed module commands with no error messages

If a module command fails to execute but no error messages are stored, a
generic error message is logged.
This commit is contained in:
Markus Mäkelä
2017-09-28 13:53:40 +03:00
parent 380482d507
commit da648387dd

View File

@ -1705,7 +1705,9 @@ static void callModuleCommand(DCB *dcb, char *domain, char *id, char *v3,
if (!modulecmd_call_command(cmd, arg, &output))
{
dcb_printf(dcb, "Error: %s\n", modulecmd_get_error());
const char* err = modulecmd_get_error();
dcb_printf(dcb, "Error: %s\n", *err ? err :
"Call to module command failed, see log file for more details");
}
else if (output)
{