Lines Matching refs:exception

32 8.  Exception handling		|exception-handling|
371 exception: When comparing a number with a string they are considered
1457 meaning. The only exception is that two quotes stand for one quote.
1966 *v:exception* *exception-variable*
1967 v:exception The value of the exception most recently caught and not
1973 : echo "caught " .. v:exception
2411 v:throwpoint The point where the exception most recently caught and not
2413 also |v:exception| and |throw-variables|.
2503 Number assert {error} is in v:exception
7830 exception). If the {priority} argument is not specified, the
12621 exception: When sourcing a script again, a function
13513 ":try" and ":endtry" is converted to an exception. It
13519 exception. An error in a Vim command is converted
13524 error exception is not caught, always beginning with
13533 |:try| as the ":catch" are executed when an exception
13544 :catch /my-exception/ " catch user exception
13552 Information about the exception is available in
13553 |v:exception|. Also see |throw-variables|.
13564 interrupt or exception (see |:throw|).
13567 :th[row] {expr1} The {expr1} is evaluated and thrown as an exception.
13580 If the exception is not caught, the command processing
13661 the message is raised as an error exception instead
13750 8. Exception handling *exception-handling*
13752 The Vim script language comprises an exception handling feature. This section
13757 exception by using the ":throw" command, see |throw-catch|.
13793 When no exception is thrown during execution of the try block, the control
13796 When an exception occurs during execution of the try block, the remaining
13797 lines in the try block are skipped. The exception is matched against the
13804 When an exception that does not match any of the patterns specified by the
13805 ":catch" commands is thrown in the try block, the exception is not caught by
13807 finally clause, if present, is taken. The exception pends during execution of
13809 the ":endtry" are not executed and the exception might be caught elsewhere,
13811 When during execution of a catch clause another exception is thrown, the
13812 remaining lines in that catch clause are not executed. The new exception is
13815 a finally clause, it is executed, and the exception pends during its
13817 exception might, however, be caught elsewhere, see |try-nesting|.
13818 When during execution of the finally clause (if present) an exception is
13820 clause has been taken because of an exception from the try block or one of the
13821 catch clauses, the original (pending) exception is discarded. The commands
13822 following the ":endtry" are not executed, and the exception from the finally
13831 ":endtry" is reached. It is, however, discarded when an exception is thrown
13837 clause has been taken because of an exception or an earlier ":break",
13839 this pending exception or command is discarded.
13849 catch an exception thrown in its try block or throws a new exception from one
13858 When none of the active try conditionals catches an exception, just their
13860 An error message is displayed in case of an uncaught exception explicitly
13872 script file. Then you see when an exception is thrown, discarded, caught, or
13880 You can throw any number or string as an exception. Use the |:throw| command
13890 An exception might be thrown during evaluation of the argument of the ":throw"
13892 The ":throw" command then does not throw a new exception.
13916 abandoned by an (uncaught) exception during the expression evaluation. The
13917 exception is then propagated to the caller of the command.
13932 gets executed when a matching exception is caught.
13949 An exception is matched against the ":catch" commands in the order they are
13962 If you catch an exception by a general pattern, you may access the exact value
13963 in the variable |v:exception|: >
13966 : echo "Number thrown. Value is" v:exception
13968 You may also be interested where an exception was thrown. This is stored in
13969 |v:throwpoint|. Note that "v:exception" and "v:throwpoint" are valid for the
13970 exception most recently caught as long it is not finished.
13974 : if v:exception != ""
13975 : echo 'Caught "' . v:exception . '" in ' . v:throwpoint
14018 An exception that is not caught by a try conditional can be caught by
14033 The inner try conditional does not catch the exception, just its finally
14034 clause is executed. The exception is then caught by the outer try
14038 You can catch an exception and throw a new one to be caught elsewhere from the
14057 : echo "Caught" v:exception
14064 "v:exception" instead: >
14070 : echo "Rethrow" v:exception
14071 : throw v:exception
14077 Trying so causes an error exception. You should throw your own exception
14078 denoting the situation. If you want to cause a Vim error exception containing
14079 the original error exception value, you can use the |:echoerr| command: >
14085 : echoerr v:exception
14088 : echo v:exception
14101 a script when an error occurs or you explicitly throw an exception without
14141 : echo v:exception
14198 exception. No message is displayed and |v:errmsg| is not set then. To find
14200 the error exception is.
14219 which is converted inside try conditionals to an exception >
14226 which is converted inside try conditionals to an exception >
14240 which is converted inside try conditionals to an exception >
14253 Only the first is used for the exception value, since it is the most specific
14313 the exception "Vim:Interrupt". You can catch it like every exception. The
14378 : echo "Internal error (" . v:exception . ")"
14404 :autocmd User x echo v:exception
14412 : echo v:exception
14419 command takes place. If an exception is thrown and not caught in the sequence
14421 abandoned and the exception is propagated to the caller of the command.
14430 : echo "Caught:" v:exception "from" v:throwpoint
14434 you can see by checking 'modified'), since the exception from the BufWritePre
14435 autocommand abandons the ":write". The exception is then caught and the
14443 an active try conditional, the autocommands are skipped and an error exception
14452 : echo v:exception
14496 : echo v:exception
14504 had actually been written when the exception occurred. You need to tell it in
14551 :autocmd BufWritePost * echo v:exception
14559 Some programming languages allow to use hierarchies of exception classes or to
14560 pass additional information with the object of an exception class. You can do
14562 In order to throw an exception from a hierarchy, just throw the complete
14565 When you want to pass additional information with your exception class, add
14570 parentheses can be cut out from |v:exception| with the ":substitute" command.
14611 : let function = substitute(v:exception, '.*(\(\a\+\)).*', '\1', "")
14618 : let dir = substitute(v:exception, '.*(\(.\+\),\s*.\+).*', '\1', "")
14619 : let file = substitute(v:exception, '.*(.\+,\s*\(.\+\)).*', '\1', "")
14639 The exception handling concept requires that the command sequence causing the
14640 exception is aborted immediately and control is transferred to finally clauses
14652 conditional is active. This is no restriction since an (error) exception can
14662 However, when sourcing an existing script that does not use exception handling
14669 not converted to an exception. (See |:silent|.) So the only remaining cause
14675 Syntax errors in the exception handling commands are never caught by any of
14691 : echo 'outer catch-all caught "' . v:exception . '"'
14700 The original exception is discarded and an error exception is raised, instead.
14708 raises an error exception for the trailing characters after the ":unlet!"
14710 error exception is discarded and the "E488: Trailing characters" message gets
14715 usually the most specific one and therefore converted to the error exception.
14721 The value of the error exception inside try conditionals is: >
14725 the syntax error is used for the exception being thrown.
14731 The value of the error exception inside try conditionals is: >
14736 try | unlet novar # | catch | echo v:exception | endtry
14738 echo "outer catch:" v:exception