Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
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.11.3/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>