UNPKG
autocode
Version:
0.0.0 (0.0.0)
latest (1.3.1)
1.3.1
1.3.0
1.2.0
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.3
0.2.2
0.2.1
0.2.0
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.0
spec-driven code generator
autocode.run
ctate/autocode
autocode
/
src
/
error.coffee
14 lines
(10 loc)
•
265 B
text/coffeescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module.exports = (msg) ->
# load packages
vsprintf = require(
'sprintf'
).vsprintf
# convert args to array and remove first arg
args
= [].slice.apply arguments
args
.shift()
# format
error
error = vsprintf msg,
args
# throw
error
throw
new
Error error