find_name doesn't obey docs on unbound

Perry Wagle wagle at mac.com
Tue Feb 16 20:27:44 UTC 2010


[Please do just poke at me until I make sense.]

I tried to get it to work, asked questions on IRC until I looked at the sourcescp  and saw that the code didn't even try to generate the exception.  So, I deleted my attempts.

Since then, I found several different ways to look through the namespaces, and thought picking on find_name wasn't even close to the real problem.

That said, I tried to get this to run, just now:

.sub main :main  ### :pedantic_args
        .param string argv :slurpy
        errorson(.PARROT_ERRORS_GLOBALS_FLAG)
        push_eh myhandler
        $P0 = find_name "i_better_not_exist_or_this_thing_is_crazy"
        if null $P0 goto wasnull
        say "not null, must have existed somehow.   inconceivable!"
        exit 1
wasnull:
        say "was null.   not good!"
        exit 2
myhandler:
        say "generated exception.   excellent!"
        exit 0
.end

but the errorson command is unhappy for some reason.  I don't know when I can get back to this.

-- Perry




On Feb 16, 2010, at 11:38 AM, Jonathan Leto wrote:

> Howdy,
> 
>> Hence, my judgement was that whoever went through and added all the (optional) error generation needed to write the tests, since they would know what had been decided about what all should do what when and where.
> 
> *I* am offering to write tests. I want to know what you wrote and what
> it did. If it is undocumented, it needs tests.
> 
> Duke
> 
> 
> -- 
> Jonathan "Duke" Leto
> jonathan at leto.net
> http://leto.net



More information about the parrot-dev mailing list