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.

index.js 987B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. 'use strict'
  2. var VMessage = require('vfile-message')
  3. var VFile = require('./core.js')
  4. module.exports = VFile
  5. VFile.prototype.message = message
  6. VFile.prototype.info = info
  7. VFile.prototype.fail = fail
  8. // Create a message with `reason` at `position`.
  9. // When an error is passed in as `reason`, copies the stack.
  10. function message(reason, position, origin) {
  11. var message = new VMessage(reason, position, origin)
  12. if (this.path) {
  13. message.name = this.path + ':' + message.name
  14. message.file = this.path
  15. }
  16. message.fatal = false
  17. this.messages.push(message)
  18. return message
  19. }
  20. // Fail: creates a vmessage, associates it with the file, and throws it.
  21. function fail() {
  22. var message = this.message.apply(this, arguments)
  23. message.fatal = true
  24. throw message
  25. }
  26. // Info: creates a vmessage, associates it with the file, and marks the fatality
  27. // as null.
  28. function info() {
  29. var message = this.message.apply(this, arguments)
  30. message.fatal = null
  31. return message
  32. }