MCPcopy Create free account
hub / github.com/X-Profiler/xprofiler / checkSocketPath

Function checkSocketPath

xprofiler.js:38–51  ·  view source on GitHub ↗
(finalConfig)

Source from the content-addressed store, hash-verified

36
37/* istanbul ignore next */
38function checkSocketPath(finalConfig) {
39 const passed = xprofiler.checkSocketPath(true);
40 if (!passed) {
41 const message = 'socket path is too long, complete log of this error can be found in:\n'
42 + ` ${path.join(finalConfig.log_dir, `xprofiler-error-${moment().format('YYYYMMDD')}.log`)}\n`;
43 if (finalConfig.check_throw) {
44 throw new Error(message);
45 }
46 console.error(`\n[${moment().format('YYYY-MM-DD HH:mm:ss')}] [error] [xprofiler-ipc] [${pkg.version}] ${message}`);
47 return;
48 }
49
50 return passed;
51}
52
53function runOnce(onceKey, onceFunc) {
54 checkNecessary();

Callers 1

startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected