From 4ea28ef7c0752a0907cac789b06a613580803721 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 18 Feb 2007 02:21:21 +0000 Subject: r21419: Give some more clue about what's going on (This used to be commit 76b377d5ad5c115e5fbb24a10d543883f04283a6) --- source4/scripting/ejs/smbcalls_string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/scripting') diff --git a/source4/scripting/ejs/smbcalls_string.c b/source4/scripting/ejs/smbcalls_string.c index 403de7ba35..ab5aecd847 100644 --- a/source4/scripting/ejs/smbcalls_string.c +++ b/source4/scripting/ejs/smbcalls_string.c @@ -185,7 +185,7 @@ static int ejs_substr(MprVarHandle eid, int argc, struct MprVar **argv) length = strlen(orig); if (start_offset < 0) start_offset += strlen(orig); if (start_offset < 0 || start_offset > strlen(orig)) { - ejsSetErrorMsg(eid, "substr arg 2 out of bounds"); + ejsSetErrorMsg(eid, "substr arg 2 out of bounds ([%s], %d)", orig, start_offset); return -1; } @@ -193,7 +193,7 @@ static int ejs_substr(MprVarHandle eid, int argc, struct MprVar **argv) length = mprToInt(argv[2]); if (length < 0) length += strlen(orig) - start_offset; if (length < 0 || length+start_offset > strlen(orig)) { - ejsSetErrorMsg(eid, "substr arg 3 out of bounds"); + ejsSetErrorMsg(eid, "substr arg 3 out of bounds ([%s], %d, %d)", orig, start_offset, length); return -1; } } -- cgit