junegunn / junegunn/vader.vim

AssertThrows: handle unexpected exceptions

Open
#205 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vim Script
Stars
599
Forks
40
PR merge metrics
No merged PRs in 30d

Description

`AssertThrows` might pass with something unexpected.

I think this can be improved/detected in Vader by looking at `v:throwpoint`: if it is `function vader#assert#throws, line 5` then it means it's an undefined variable etc.

```vim
if v:throwpoint ==# 'function vader#assert#throws, line 5'
throw 'Vader: unexpected exception: ' . v:exception
endif
```

Not sure if there is a use case for anything to throw directly from `exp`?!

_Originally posted by @blueyed in https://github.com/junegunn/vader.vim/pull/162#issuecomment-390411401_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.