Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/denops_std/function/vim/mod.ts>assert_exception

📚 Standard module for denops.vim
Go to Latest
function assert_exception
import { assert_exception } from "https://deno.land/x/denops_std@v3.8.1/function/vim/mod.ts";

When v:exception does not contain the string {error} an error message is added to |v:errors|. Also see |assert-return|. This can be used to assert that a command throws an exception. Using the error number, followed by a colon, avoids problems with translations: try commandthatfails call assert_false(1, 'command should have failed') catch call assert_exception('E492:') endtry

Parameters

denops: Denops
error: unknown
optional
msg: unknown

Returns

Promise<unknown>