Skip to content

Commit 697a386

Browse files
committed
better error: <type> is not a function
1 parent 9c5d0c4 commit 697a386

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/pico-engine-core/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function applyFn (fn, ctx, args) {
4646
throw new Error('actions can only be called in the rule action block')
4747
}
4848
if (!ktypes.isFunction(fn)) {
49-
throw new Error('Not a function')
49+
throw new Error(ktypes.typeOf(fn) + ' is not a function')
5050
}
5151
return fn(ctx, args)
5252
}

0 commit comments

Comments
 (0)