OpenVeo Publish server

API Docs for: 8.0.0
Show:

File: app/server/watcher/WatcherError.js

  1. 'use strict';
  2.  
  3. /**
  4. * @module watcher
  5. */
  6.  
  7. var util = require('util');
  8.  
  9. /**
  10. * Defines an error occurring while watching for directory changes.
  11. *
  12. * @class WatcherError
  13. * @extends Error
  14. * @constructor
  15. * @param {String} message The error message
  16. * @param {String} code The error code
  17. * @param {String} directoryPath The absolute path of the directory in error
  18. */
  19. function WatcherError(message, code, directoryPath) {
  20. Error.captureStackTrace(this, this.constructor);
  21.  
  22. Object.defineProperties(this, {
  23.  
  24. /**
  25. * The fs.FSWatcher's error code.
  26. *
  27. * @property code
  28. * @type String
  29. * @final
  30. */
  31. code: {value: code},
  32.  
  33. /**
  34. * The absolute path of the watched directory the error belongs to.
  35. *
  36. * @property directoryPath
  37. * @type String
  38. * @final
  39. */
  40. directoryPath: {value: directoryPath},
  41.  
  42. /**
  43. * Error message.
  44. *
  45. * @property message
  46. * @type String
  47. */
  48. message: {value: message, writable: true},
  49.  
  50. /**
  51. * Error name.
  52. *
  53. * @property name
  54. * @type String
  55. */
  56. name: {value: 'WatcherError', writable: true}
  57.  
  58. });
  59. }
  60.  
  61. module.exports = WatcherError;
  62. util.inherits(WatcherError, Error);
  63.