Skip to content

Commit 08cc270

Browse files
Darleletcapflam
authored andcommitted
BUG/MINOR: hlua: report proper context upon error in hlua_cli_io_handler_fct()
As a result of copy pasting, hlua_cli_io_handler_fct() used to report lua exceptions like E_ETMOUT as "Lua converter" instead of "Lua cli". Let's fix that. It could be backported to all stable versions. [ada: for older versions, HLUA_E_BTMOUT case didn't exist so it has to be skipped] (cherry picked from commit 185d230) Signed-off-by: Christopher Faulet <[email protected]>
1 parent d5c8676 commit 08cc270

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/hlua.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11755,22 +11755,22 @@ static int hlua_cli_io_handler_fct(struct appctx *appctx)
1175511755
return 1;
1175611756

1175711757
case HLUA_E_ETMOUT:
11758-
SEND_ERR(NULL, "Lua converter '%s': execution timeout.\n",
11758+
SEND_ERR(NULL, "Lua cli '%s': execution timeout.\n",
1175911759
fcn->name);
1176011760
return 1;
1176111761

1176211762
case HLUA_E_BTMOUT:
11763-
SEND_ERR(NULL, "Lua converter '%s': burst timeout.\n",
11763+
SEND_ERR(NULL, "Lua cli '%s': burst timeout.\n",
1176411764
fcn->name);
1176511765
return 1;
1176611766

1176711767
case HLUA_E_NOMEM:
11768-
SEND_ERR(NULL, "Lua converter '%s': out of memory error.\n",
11768+
SEND_ERR(NULL, "Lua cli '%s': out of memory error.\n",
1176911769
fcn->name);
1177011770
return 1;
1177111771

1177211772
case HLUA_E_YIELD: /* unexpected */
11773-
SEND_ERR(NULL, "Lua converter '%s': yield not allowed.\n",
11773+
SEND_ERR(NULL, "Lua cli '%s': yield not allowed.\n",
1177411774
fcn->name);
1177511775
return 1;
1177611776

0 commit comments

Comments
 (0)