summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2007-02-18 02:21:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:48:29 -0500
commit4ea28ef7c0752a0907cac789b06a613580803721 (patch)
treee4dd27c27b13d6931d80e3dd9cc5476748555a09 /source4/scripting/ejs
parentd0feaf0c0314c0f867a2f8e94b7b1774634d29d5 (diff)
downloadsamba-4ea28ef7c0752a0907cac789b06a613580803721.tar.gz
samba-4ea28ef7c0752a0907cac789b06a613580803721.tar.bz2
samba-4ea28ef7c0752a0907cac789b06a613580803721.zip
r21419: Give some more clue about what's going on
(This used to be commit 76b377d5ad5c115e5fbb24a10d543883f04283a6)
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r--source4/scripting/ejs/smbcalls_string.c4
1 files changed, 2 insertions, 2 deletions
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;
}
}