On Tue, Jul 21, 2009 at 3:44 PM, Thomas Allen wrote:
>
> On Jul 21, 1:25 pm, Ben Fritz <fritzophre...@gmail.com> wrote:
>> Ugh, so much for the "not looking like an idiot".
>>
>> This would work, except:
>>
>> a) In Vim, unlike Perl, apparently non-null strings DON'T evaluate to
>> true (is this documented anywhere? I can't find it if it is!)
>> b) you weren't returning a string anyway.
>>
>> Returning 0 should still work, but check that type(project) == type
>> ({}) for your sentinal, rather than checking for true/false of the
>> value itself.
>
> Yea, I thought of just returning something else and then checking it,
> but I figured vimscript can raise fatal exceptions. Is there a command/
> function to kill the script flow itself? I could add that to the end
> of s:echoError...

That's exactly what raising an exception does.  When you get an
exception, why are you printing out a message about that exception,
and then ignoring that it ever happened?  Why not just :throw
something in s:ProjGetInfo() and :catch it in the caller?

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to