I'm pretty sure this is well known (unless I'm the only
one writing
code with bugs in it!), but I thought I should log it
since I don't
see it anywhere:
Line numbers in error message tracebacks are way off.
Here's such a traceback:
------------------------------------------------------------------
Run-time error 106
File SoapClient.icn; Line 100
procedure or integer expected
offending value: &null
Traceback:
main()
soap__SoapClient_call(record
soap__SoapClient__state_1(record
soap__SoapClient__state_1(5),record
soap__SoapClient__methods_1(13),"http://tapestry/...","http://tapestry/...",&null),"query",list_1
= ["*","host = 'tapestry...","date DESC"]) from line 11
in soapclient.icn
soap__SoapClient_buildSoapMsg(record
soap__SoapClient__state_1(record
soap__SoapClient__state_1(5),record
soap__SoapClient__methods_1(13),"http://tapestry/...","http://tapestry/...",&null),"query",list_1
= ["*","host = 'tapestry...","date DESC"]) from line 74
in SoapClient.icn
&null() from line 100 in SoapClient.icn
-------------------------------------------------------------------
And here's a few lines from SoapClient.icn, ending at
line 100:
--------------------------------------------------------------------
#<p>
# Build a soap message wrapping an rpc call.
#</p>
method buildSoapMsg(rpc,args)
local msg, i
i := create seq()
msg := " <SOAP-ENV:Body>\n"
msg ||:= " <namesp:"||rpc||"
xmlns:namesp=\&quot;"||uri||"\&quot;>\n"
every msg ||:= soap::encode(!args," ",i)||"\n"
msg ||:= " </namesp:"||rpc||">\n"
msg ||:= " </SOAP-ENV:Body>\n"
return soapHead()||msg||soapTail()
end
#<p>
# Produce an HTTP action message.
#</p>
method mkHttpPostMsg(msg)
local s, a
s := "POST: /SOAP HTTP/1.1\n"
s ||:= "Content-Type: text/xml;
charset=\&quot;utf-8\&quot;\n"
s ||:= "Content-Length: "||*msg||"\n"
s ||:= "SOAPAction: \&quot;"||proxy||"\&quot;\n\n"
s ||:= msg
return s
end
#<p>
# Create a new SOAP client.
#</p>
initially (newUri, newProxy)
uri := newUri
proxy := \newProxy | uri
debugFile := &null # this is line 100
-----------------------------------------------------------------------
Note that line 100 isn't even in the same method as
the error! (The actual error was on line 76...)
Logged In: YES
user_id=436876
idol.icn needs outline +:= _ about 20 places.
for each newline output.
Logged In: YES
user_id=436876
testing a fix
Logged In: YES
user_id=436876
See idol.dif under bug
[ 712292 ] class(var:type:default) crashes Unicon
for the fix. Please email me if you get any wrong line#s
after patching.
If the error is that soapHead is &null, this is fixed in uni116.zip.
If no errors are off by more than +-1, please close this bug. See
[#99] runtime error traceback in a coercion has line# off by +-1
^ probably an iconx bug, not unicon.
Related
Bugs: #99