Undocumented Luabind error messages

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Undocumented Luabind error messages

Alexander Gladysh
Hi all!

1. Just got this one:

    [string "myfile.lua"]:56: [string "myfile.lua"]:163: No such
operator defined

Seems to be emitted from line 442 of class_rep.hpp.

I have not found this error message in paragraph 14.5 of the
documentation, and the text of error message is not descriptive enough
to get a clue on what's going on. :(

2. Quick search in beta 7 sources gave following undocumented error messages:

1) class_rep.cpp(251)
    luabind does not support member names with extra nulls: (...)

2) class_rep.cpp(442)
    No such operator defined

(BTW, note first capital, while rest of messages are started with lowercase.)

3) class_rep.cpp(507)
    call of overloaded constructor (...) is ambiguous
    none of the overloads have a best conversion: (...)

(Only shorter version is documented.)

4) class_rep.cpp(1232)
    class-name:__init is not defined

(BTW, note typo in comment above this error message -- 'funktion'.)

5) class_rep.cpp(1249) and (1269)
    derived class must call super on base

6) class_rep.cpp(1353)
    derived class 'class-name'must call super on base

(BTW, there should be space between before word 'must'.)

7) class_rep.cpp(1388)
    cannot set property (...) because it's read only

8) class_rep.cpp(1450)
    no static (...) in class 'class-name'

9) create_class.cpp(75)
    expected class to derive from or a newline

10) create_class.cpp(114)
    invalid construct, expected class name

11) create_class.cpp(119)
    luabind does not support class names with extra nulls

I think that is better to at least mention all possible error
messages, so end-user would not have to search lua and luabind sources
to find which library generated an error and what that error means.

Also it would be good to have some examples for what can trigger this
or that error message (for non-trivial cases of course).

3. IMHO following error message in the docs should be split to two
messages to ease reading.

    class-name() threw an exception, class-name:function-name() threw
an exception

Should be

    class-name() threw an exception
    class-name:function-name() threw an exception

Thanks,
Alexander.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: Undocumented Luabind error messages

Alexander Gladysh
> 1. Just got this one:
>
>    [string "myfile.lua"]:56: [string "myfile.lua"]:163: No such
> operator defined
>
> Seems to be emitted from line 442 of class_rep.hpp.
>
> I have not found this error message in paragraph 14.5 of the
> documentation, and the text of error message is not descriptive enough
> to get a clue on what's going on. :(

Found cause of this one -- it is actually what error message says,
I've forgot to define operator * for my class. Strange that the line
with error is neither 56 nor 163 -- this confused me.

However, it would be nice to have some clues on which of operators is
not defined -- if it is possible of course.

Thanks,
Alexander.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: Re: Undocumented Luabind error messages

Arvid Norberg

On Feb 27, 2006, at 16:40, Alexander Gladysh wrote:

>> 1. Just got this one:
>>
>>    [string "myfile.lua"]:56: [string "myfile.lua"]:163: No such
>> operator defined
>>
>> Seems to be emitted from line 442 of class_rep.hpp.
>>
>> I have not found this error message in paragraph 14.5 of the
>> documentation, and the text of error message is not descriptive  
>> enough
>> to get a clue on what's going on. :(
>
> Found cause of this one -- it is actually what error message says,
> I've forgot to define operator * for my class. Strange that the line
> with error is neither 56 nor 163 -- this confused me.

Thanks for this list. We'll go through it and update the documentation.

> However, it would be nice to have some clues on which of operators is
> not defined -- if it is possible of course.

The reason why the operator isn't specified in the error message  
right now is because the dispatched function doesn't know which  
operator triggered it (if I remember correctly).

--
Arvid Norberg




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user