summaryrefslogtreecommitdiff
path: root/lib/perf_hooks.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/perf_hooks.js')
-rw-r--r--lib/perf_hooks.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/perf_hooks.js b/lib/perf_hooks.js
index e4c2a985e4..7fa5501b28 100644
--- a/lib/perf_hooks.js
+++ b/lib/perf_hooks.js
@@ -383,7 +383,7 @@ class PerformanceObserver extends AsyncResource {
observe(options) {
const errors = lazyErrors();
if (typeof options !== 'object' || options == null) {
- throw new errors.ERR_INVALID_ARG_TYPE('options', 'Object');
+ throw new errors.ERR_INVALID_ARG_TYPE('options', 'Object', options);
}
if (!Array.isArray(options.entryTypes)) {
throw new errors.ERR_INVALID_OPT_VALUE('entryTypes', options);
@@ -420,7 +420,7 @@ class Performance extends PerformanceObserverEntryList {
set maxEntries(val) {
if (typeof val !== 'number' || val >>> 0 !== val) {
const errors = lazyErrors();
- throw new errors.ERR_INVALID_ARG_TYPE('val', 'number');
+ throw new errors.ERR_INVALID_ARG_TYPE('val', 'number', val);
}
this[kMaxCount] = Math.max(1, val >>> 0);
}
@@ -533,7 +533,7 @@ class Performance extends PerformanceObserverEntryList {
timerify(fn) {
if (typeof fn !== 'function') {
const errors = lazyErrors();
- throw new errors.ERR_INVALID_ARG_TYPE('fn', 'Function');
+ throw new errors.ERR_INVALID_ARG_TYPE('fn', 'Function', fn);
}
if (fn[kTimerified])
return fn[kTimerified];