Mercurial > vim
comparison src/testdir/test55.in @ 8631:e5f2e0f8af10 v7.4.1605
commit https://github.com/vim/vim/commit/3905e291fe4375ca5c59efa9ffcb01a39c7be3a9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 19 18:44:08 2016 +0100
patch 7.4.1605
Problem: Catching exception that won't be thrown.
Solution: Remove try/catch.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 19 Mar 2016 18:45:05 +0100 |
parents | 14ab6c685581 |
children |
comparison
equal
deleted
inserted
replaced
8630:062d86d6ef92 | 8631:e5f2e0f8af10 |
---|---|
171 : $put =a:a . len(self.data) | 171 : $put =a:a . len(self.data) |
172 :endfunc | 172 :endfunc |
173 :let dict.data = [1,2,3] | 173 :let dict.data = [1,2,3] |
174 :call dict.func("len: ") | 174 :call dict.func("len: ") |
175 :let x = dict.func("again: ") | 175 :let x = dict.func("again: ") |
176 :try | 176 :let Fn = dict.func |
177 : let Fn = dict.func | 177 :call Fn('xxx') |
178 : call Fn('xxx') | |
179 :catch | |
180 : $put =v:exception[:15] | |
181 :endtry | |
182 :" | 178 :" |
183 :" Function in script-local List or Dict | 179 :" Function in script-local List or Dict |
184 :let g:dict = {} | 180 :let g:dict = {} |
185 :function g:dict.func() dict | 181 :function g:dict.func() dict |
186 : $put ='g:dict.func'.self.foo[1].self.foo[0]('asdf') | 182 : $put ='g:dict.func'.self.foo[1].self.foo[0]('asdf') |