How to use the yerror.cast function in yerror

To help you get started, we’ve selected a few yerror examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nfroidure / metapak / src / metapak.js View on Github external
if (packageConfModified) {
        log(
          'info',
          '🚧 - The project package.json changed, you may want' +
            ' to `npm install` again to install new dependencies.'
        );
      }
      if (assetsModified) {
        log(
          'info',
          '🚧 - Some assets were added to the project, you may want to stage them.'
        );
      }
      exit(0);
    } catch (err) {
      const castedErr = YError.cast(err);

      log(
        'error',
        '💀 - Could not run metapak script correctly:',
        castedErr.code,
        castedErr.params
      );
      log('info', '💊 - Debug by running again with "DEBUG=metapak" env.');
      log('stack', castedErr.stack);
      exit(1);
    }
  };
}

yerror

It helps to know why you got an error.

MIT
Latest version published 9 months ago

Package Health Score

65 / 100
Full package analysis

Popular yerror functions