On 5 July 2013 16:09, Goubier Thierry <[email protected]> wrote:
>
>
> Le 05/07/2013 15:31, Igor Stasenko a écrit :
>>
>> On 5 July 2013 15:22, Igor Stasenko <[email protected]> wrote:
>>>
>>> On 5 July 2013 11:03, Goubier Thierry <[email protected]> wrote:
>>>>
>>>> Could you rather test for unability to get the source of the method and
>>>> raise a NB-defined error? So that I could write a fallback on non-NB
>>>> code
>>>> with a on: do:. Please :)
>>>>
>>>> (it would then both handle startup related errors and unreadable sources
>>>> as
>>>> well).
>>>>
>>>> And with a backport to 2.0, because the odds of seeing an Opal based
>>>> solution on 2.0 are fairly low.
>>>>
>>> the problem is that you will get same error when you put wrong name
>>> into signature
>>> or when no sources avail e.g.:
>>>
>>> foo: bar
>>>   ^ self nbCall: #( void foo (int baz) )
>>>
>>> will give same error (unable to find binding for name 'baz' in given
>>> context).
>
>
> Of course. I could do with having the same error for both and knowing that
> when developping and testing I would get it for stupid syntax errors and in
> production to handle a real situation.
>
>
>>> If its fine to you, i can do it.
>
>
> Maybe I can try myself to see if I can write, before entering that loader
> stuff, a correct test which raises an error if the method source isn't
> available.
>
>
well, all you need is basicaly replace this:

 Error signal: 'Could not find accessor for variable named "' ,
argName , '" in ' , method name

with:

NBArgumentNotFound signal: argName

.. or NBCannotBindName..

what name for exception?


-- 
Best regards,
Igor Stasenko.

Reply via email to