Lines Matching refs:exception

98     call assert_true(v:exception =~ 'E171:')
128 call assert_true(v:exception =~ 'E171:')
1535 asdf " aborting error, triggering error exception
1570 call interrupt() " triggering interrupt exception
1680 " its :endtry should not rethrow the exception to the next surrounding
1698 catch /xyz/ " try 1 active, but exception already caught
1982 throw "exception"
1994 throw "exception"
2006 throw "exception"
2637 " When an exception is thrown but not caught inside a function, the
2713 " When an exception is thrown but not caught inside a script file,
2771 " When an exception is thrown but not caught, an error message is
2773 " or error exception, the normal interrupt or error message(s) are
2891 let x = novar " error E121; exception: E121
2910 " error E108/E488; exception: E488
3432 " Test 57: v:exception and v:throwpoint for user exceptions {{{1
3434 " v:exception evaluates to the value of the exception that was caught
3435 " most recently and is not finished. (A caught exception is finished
3438 " where that exception has been thrown.
3448 let g:exception = v:exception
3458 command! CmdException let g:exception = v:exception
3490 let exception = v:exception
3492 call assert_equal("oops", v:exception)
3496 exec "let exception = v:exception"
3498 call assert_equal("oops", v:exception)
3504 call assert_equal("oops", v:exception)
3510 call assert_equal("oops", v:exception)
3516 call assert_equal("oops", v:exception)
3525 let exception = v:exception
3527 call assert_equal("arrgh", v:exception)
3538 let exception = v:exception
3540 call assert_equal("autsch", v:exception)
3545 let exception = v:exception
3547 call assert_equal("arrgh", v:exception)
3557 let exception = v:exception
3560 call assert_equal("brrrr", v:exception)
3565 let exception = v:exception
3567 call assert_equal("arrgh", v:exception)
3572 let exception = v:exception
3574 call assert_equal("arrgh", v:exception)
3579 let exception = v:exception
3581 call assert_equal("arrgh", v:exception)
3586 let exception = v:exception
3588 call assert_equal("oops", v:exception)
3593 let exception = v:exception
3595 call assert_equal("oops", v:exception)
3600 let exception = v:exception
3602 call assert_equal("", v:exception)
3609 unlet exception throwpoint
3628 " Test 58: v:exception and v:throwpoint for error/interrupt exceptions {{{1
3630 " v:exception and v:throwpoint work also for error and interrupt
3653 if v:exception !~ 'Vim(delfunction):'
3664 if v:exception != ""
3675 if v:exception != ""
3689 if v:exception != 'Vim:Interrupt'
3700 if v:exception != ""
3711 if v:exception != ""
3726 " Test 59: v:exception and v:throwpoint when discarding exceptions {{{1
3729 " interrupt exception, v:exception and v:throwpoint are reset. They
3730 " are not affected by an exception that is discarded before being
3746 call assert_equal('', v:exception)
3755 call assert_equal('', v:exception)
3760 call assert_equal('', v:exception)
3775 call assert_match('Vim:E492: Not an editor command:', v:exception)
3783 call assert_equal('', v:exception)
3800 call assert_match('Vim:Interrupt', v:exception)
3808 call assert_equal('', v:exception)
3827 call assert_match('Vim(catch):E171: Missing :endif:', v:exception)
3835 call assert_equal('', v:exception)
3852 call assert_equal('', v:exception)
3867 call assert_equal('', v:exception)
3870 call assert_equal('', v:exception)
3885 call assert_match('Vim:E492: Not an editor command:', v:exception)
3893 call assert_equal('', v:exception)
3910 call assert_match('Vim:Interrupt', v:exception)
3918 call assert_equal('', v:exception)
3933 call assert_equal('', v:exception)
3938 call assert_match('Vim(finally):E171: Missing :endif:', v:exception)
3946 call assert_equal('', v:exception)
3963 call assert_match('Vim(endtry):E171: Missing :endif:', v:exception)
3971 call assert_equal('', v:exception)
3984 " Test 60: (Re)throwing v:exception; :echoerr. {{{1
3986 " A user exception can be rethrown after catching by throwing
3987 " v:exception. An error or interrupt exception cannot be rethrown
3988 " because Vim exceptions cannot be faked. A Vim exception using the
3989 " value of v:exception can, however, be triggered by the :echoerr
4001 throw v:exception " rethrow user exception
4005 catch /^oops$/ " catches rethrown user exception
4023 throw v:exception " throw error: cannot fake Vim exception
4048 catch /^Vim/ " catch error exception
4050 " Trigger Vim error exception with value specified after :echoerr
4051 let value = substitute(v:exception, '^Vim\((.*)\)\=:', '', "")
4061 call assert_match(value, v:exception)
4079 catch /^Vim:/ " catch interrupt exception
4081 " Trigger Vim error exception with value specified after :echoerr
4082 echoerr substitute(v:exception, '^Vim\((.*)\)\=:', '', "")
4091 call assert_match('Interrupt', v:exception)
4103 " interrupt exception is thrown and can be caught. Its value is
4106 " that try block are ignored, but the interrupt exception can be
4228 " An error inside a :try/:endtry region is converted to an exception
4229 " and can be caught. The error exception has a "Vim(cmdname):" prefix
4244 let v:errmsg = substitute(v:exception, '^Vim(unlet):', '', "")
4271 let v:errmsg = substitute(v:exception, '^Vim(throw):', '', "")
4294 throw "Vim:faked" " error: cannot fake Vim exception
4298 let v:errmsg = substitute(v:exception, '^Vim(throw):', '', "")
4331 let v:errmsg = substitute(v:exception, '^Vim(endfunction):', '', "")
4364 let v:errmsg = substitute(v:exception, '^Vim:', '', "")
4398 let v:errmsg = substitute(v:exception, '^Vim(call):', '', "")
4433 let v:errmsg = substitute(v:exception, '^Vim(return):', '', "")
4457 " conversion of errors to an exception and the immediate abortion on
4459 " a new :try/:endtry region, conversion of errors to exception and
4500 let errmsg3 = substitute(v:exception, '^Vim:', '', "")
4560 " block are ignored, but the error exception can be caught by the next
4561 " surrounding try conditional. Any previous error exception is
4576 endwhile " throw error exception
4605 catch /.*/ " throw error exception
4641 catch /.*/ " throw error exception
4677 catch /x/ " throw error exception
4707 endif " :endif without :if; throw error exception
4750 catch /\)/ " not checked; exception has already been caught
4768 catch /\)/ " error; discards exception
4776 catch /^ab$/ " checked, but original exception is discarded
4780 call assert_match('Vim(catch):E475: Invalid argument:', v:exception)
4883 " On a call command, an exception might be thrown when evaluating the
4885 " function is being executed. The exception can be caught by the
5023 " On a function call within an expression, an exception might be
5025 " arguments, or when the function is being executed. The exception
5213 " exception. Set it to the original error message.
5214 let v:errmsg = substitute(v:exception, '^Vim:', '', "")
5216 " An error exception has been thrown after the original error.
5255 " An error exception has been triggered after the interrupt.
5256 let v:errmsg = substitute(v:exception, '^Vim\((\a\+)\)\=:', '', "")
5294 " An error exception has been triggered after the :throw.
5295 let v:errmsg = substitute(v:exception, '^Vim\((\a\+)\)\=:', '', "")
5300 continue " discard exception
5428 " not the exception is converted to an exception.
5462 " message is given and converted to an exception, and the expression
5525 " exception. Set it to the original error message.
5526 let v:errmsg = substitute(v:exception, '^Vim\((\a\+)\)\=:', '', "")
5552 " exception. Set it to the original error message.
5553 let v:errmsg = substitute(v:exception, '^Vim\((\a\+)\)\=:', '', "")
5601 " throwing an error exception. If, however, a syntax error is
5602 " detected afterwards, this one is used for the error exception.
5644 call assert_match('E121: Undefined variable: novar', v:exception)
5662 call assert_match('E488: Trailing characters', v:exception)
5664 call assert_match('E121: Undefined variable: novar', v:exception)
5687 call assert_match('E475: Invalid argument: {novar}', v:exception)
5715 " :elseif, an error message is given (or an error exception thrown)
5760 call assert_match('E584: :elseif after :else', v:exception)
5783 call assert_match('E584: :elseif after :else', v:exception)
5803 call assert_match('E582: :elseif without :if', v:exception)
5825 call assert_match('E582: :elseif without :if', v:exception)
5848 " When an exception is thrown from inside a :try conditional without
5850 " the :endtry is reached, the exception is discarded.
5915 " When an exception is thrown and an error or interrupt occurs before
5916 " the matching :catch clause is reached, the exception is discarded
5918 " exception being thrown then).
6057 " When an exception is thrown and an error or interrupt occurs before
6058 " the :finally of the innermost :try is reached, the exception is
6128 " When an exception occurs in a sequence of autocommands for
6131 " exception is propagated to the caller.
6135 " been defined by the autocommands before the exception occurred.
6209 " ... but break loop for caught interrupt exception,
6234 " ... but break loop for caught error exception,
6248 " ... but break loop for caught interrupt exception,
6268 " executed after it should be skipped on an error (exception) in the
6320 call assert_match("E212: Can't open file for writing", v:exception)
6347 call assert_match('E492: Not an editor command', v:exception)
6381 call assert_match("E484: Can't open file", v:exception)
6413 call assert_match('E492: Not an editor command', v:exception)