Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

error.js 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /**
  2. * Archiver Core
  3. *
  4. * @ignore
  5. * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
  6. * @copyright (c) 2012-2014 Chris Talkington, contributors.
  7. */
  8. var util = require('util');
  9. const ERROR_CODES = {
  10. 'ABORTED': 'archive was aborted',
  11. 'DIRECTORYDIRPATHREQUIRED': 'diretory dirpath argument must be a non-empty string value',
  12. 'DIRECTORYFUNCTIONINVALIDDATA': 'invalid data returned by directory custom data function',
  13. 'ENTRYNAMEREQUIRED': 'entry name must be a non-empty string value',
  14. 'FILEFILEPATHREQUIRED': 'file filepath argument must be a non-empty string value',
  15. 'FINALIZING': 'archive already finalizing',
  16. 'QUEUECLOSED': 'queue closed',
  17. 'NOENDMETHOD': 'no suitable finalize/end method defined by module',
  18. 'DIRECTORYNOTSUPPORTED': 'support for directory entries not defined by module',
  19. 'FORMATSET': 'archive format already set',
  20. 'INPUTSTEAMBUFFERREQUIRED': 'input source must be valid Stream or Buffer instance',
  21. 'MODULESET': 'module already set',
  22. 'SYMLINKNOTSUPPORTED': 'support for symlink entries not defined by module',
  23. 'SYMLINKFILEPATHREQUIRED': 'symlink filepath argument must be a non-empty string value',
  24. 'SYMLINKTARGETREQUIRED': 'symlink target argument must be a non-empty string value',
  25. 'ENTRYNOTSUPPORTED': 'entry not supported'
  26. };
  27. function ArchiverError(code, data) {
  28. Error.captureStackTrace(this, this.constructor);
  29. //this.name = this.constructor.name;
  30. this.message = ERROR_CODES[code] || code;
  31. this.code = code;
  32. this.data = data;
  33. }
  34. util.inherits(ArchiverError, Error);
  35. exports = module.exports = ArchiverError;