Print %%error not %%end guard on error, from George Nachman.

This commit is contained in:
Nicholas Marriott 2013-03-04 09:09:07 +00:00
parent 43d904dbf3
commit 70397e4a95

View File

@ -207,8 +207,12 @@ cmdq_continue(struct cmd_q *cmdq)
if (guards)
cmdq_print(cmdq, "%%begin");
retval = cmdq->cmd->entry->exec(cmdq->cmd, cmdq);
if (guards)
if (guards) {
if (retval == CMD_RETURN_ERROR)
cmdq_print(cmdq, "%%error");
else
cmdq_print(cmdq, "%%end");
}
if (retval == CMD_RETURN_ERROR)
break;