import { assert_exception } from "https://deno.land/x/denops_std@v3.6.0/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