Menu

#32 Line numbers in error traces way off.

None
closed
nobody
None
5
2017-05-20
2003-03-03
No

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=\""||uri||"\">\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=\"utf-8\"\n"
s ||:= "Content-Length: "||*msg||"\n"
s ||:= "SOAPAction: \""||proxy||"\"\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...)

Discussion

  • Charles Evans

    Charles Evans - 2003-04-01

    Logged In: YES
    user_id=436876

    idol.icn needs outline +:= _ about 20 places.
    for each newline output.

     
  • Charles Evans

    Charles Evans - 2003-04-30

    Logged In: YES
    user_id=436876

    testing a fix

     
  • Charles Evans

    Charles Evans - 2003-06-24

    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.

     
  • Charles Evans

    Charles Evans - 2010-01-14

    If the error is that soapHead is &null, this is fixed in uni116.zip.

     
  • Charles Evans

    Charles Evans - 2014-01-07

    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

  • Jafar

    Jafar - 2017-05-20
    • status: open --> closed
    • Group: -->
     

Log in to post a comment.