function exitError (err) { cli.showUsage() if (err && err.message) { console.log('\x1b[31m') console.trace(err) if (err.message === 'Unable to determine the domain name') { console.log('-> check your connection options to the docker daemon and confirm containers exist') } console.log('\x1b[0m') } process.exit(-1) }
// Skip (aka seek) to a specific point, in seconds skipTo (time) { if (!Number.isFinite(time)) { console.error('Tried to skip to a non-finite time ' + time) return console.trace() } if (isCasting(this.state)) Cast.seek(time) else this.state.playing.jumpToTime = time }
trace(...args) { // eslint-disable-next-line no-console console.trace(...args); }
enforcePrerequisites() .then(migrateData) .then(startWebServer) .catch(error => { console.log(chalk.red('Failed to start Flood:')); console.trace(error); process.exit(1); });
function deprecated() { if (!warned) { if (process.throwDeprecation) { throw new Error(msg); } else if (process.traceDeprecation) { console.trace(msg); } else { console.error(msg); } warned = true; } return fn.apply(this, arguments); }
// TODO: Move this to util, doesn't belong here createDirectory(options) { if (options.path) { mkdirp(options.path, error => { if (error) { console.trace('Error creating directory.', error); } }); } }
}) .catch(error => { console.trace(error); done(); fail('Error creating class: ' + JSON.stringify(error));
throw new Error(msg); } else if (config('traceDeprecation')) { console.trace(msg); } else { console.warn(msg);
}) .catch(error => { console.trace(error); done(); fail('Error creating class: ' + JSON.stringify(error));
function deprecated() { if ( ! warned ) { if ( process.throwDeprecation ) { throw new Error( msg ); } else if ( process.traceDeprecation ) { console.trace( msg ); } else { console.error( msg ); } warned = true; } return fn.apply( this, arguments ); }
function deprecated() { if (!warned) { if (process.throwDeprecation) { throw new Error(msg); } else if (process.traceDeprecation) { console.trace(msg); } else { console.error(msg); } warned = true; } return fn.apply(this, arguments); }
function deprecated() { if (!warned) { if (process.throwDeprecation) { throw new Error(msg); } else if (process.traceDeprecation) { console.trace(msg); } else { console.error(msg); } warned = true; } return fn.apply(this, arguments); }
throw new Error(msg); } else if (config('traceDeprecation')) { console.trace(msg); } else { console.warn(msg);
function deprecated() { if (!warned) { if (process.throwDeprecation) { throw new Error(msg); } else if (process.traceDeprecation) { console.trace(msg); } else { console.error(msg); } warned = true; } return fn.apply(this, arguments); }