1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

jsgen: optional "or blocks" (#6938)

This commit is contained in:
Leah Lundqvist
2020-11-24 22:52:23 +01:00
committed by GitHub
parent 23c9563600
commit 96b73acad7
5 changed files with 98 additions and 8 deletions

View File

@ -0,0 +1,6 @@
module builtin
// used to generate JS throw statements.
pub fn js_throw(s any) {
#throw (s instanceof Error ? s : new Error(s))
}