Re: Puzzling error message after a throw

2011-05-17 Thread Spiros Bousbouras
On May 17, 12:36 am, Étienne Faure tinou...@gmail.com wrote: On Mon, May 16, 2011 at 23:51, Spiros Bousbouras spi...@gmail.com wrote: function! Foo() throw 0 endfunction if 1 call Foo() endif When I execute the above script I get E605: Exception not caught: 0 [...]

Re: Puzzling error message after a throw

2011-05-17 Thread Ben Schmidt
function! Foo() throw 0 endfunction if 1 call Foo() endif When I execute the above script I get E605: Exception not caught: 0 [...] line6: E171: Missing :endif But I don't want to catch the exception. This arose in a situation where I want a command to stop

Puzzling error message after a throw

2011-05-16 Thread Spiros Bousbouras
function! Foo() throw 0 endfunction if 1 call Foo() endif When I execute the above script I get E605: Exception not caught: 0 [...] line6: E171: Missing :endif Is the error about the endif a bug ? In a complicated script it could send someone on a wild goose chase when

Re: Puzzling error message after a throw

2011-05-16 Thread Étienne Faure
Hello, On Mon, May 16, 2011 at 23:51, Spiros Bousbouras spi...@gmail.com wrote: function! Foo()    throw 0 endfunction if 1    call Foo() endif When I execute the above script I get    E605: Exception not caught: 0 [...]    line    6:    E171: Missing :endif Like in most programing