src/modules/render.js
/**
 * Generic error handler for render stuff
 */
Generic error handler for render stuff
Generic error handler for render stuff
function errorHandler (err) {
  if (err instanceof NotFoundError) {
    console.error(`${pkg.shortname}: ${err.message}`)
    console.error(`See '${pkg.shortname} render --help'`)
    return
  }
  if (err instanceof EngineError) {
    console.log(`${pkg.shortname}: ${err.message}`)
    console.log(`See '${pkg.shortname} engine --all' for available engines`)
    return
  }
  if (err) {
    console.error(err)
  }
}
function errorHandler ( err ) { if ( err instanceof NotFoundError ) { console . error ( ` ${ pkg . shortname } ${ err . message } ` ) console . error ( ` ${ pkg . shortname } ` ) return } if ( err instanceof EngineError ) { console . log ( ` ${ pkg . shortname } ${ err . message } ` ) console . log ( ` ${ pkg . shortname } ` ) return } if ( err ) { console . error ( err ) } }
Generic error handler for render stuff
Generic error handler for render stuff