There are several wordings for this depending on what programming languages you are used to, but none of them turned up results for me. Also, neither
help abort() nor
help raise() nor
help throw() gave me anything.
How would you explicitly throw an error? How would you explicitly raise an error? How would you explicitly abort?
I have in the past just written my errormessage directly, which is of course invalid code and raises an error, but I'd prefer to be clear about what I'm doing here.
function may_fail() abort let l:message = system('something') if v:shell_error there was a problem with something <- can I use an actual abort() or something here? endif endfunction