UI for Zipcoin Blue

errors.js 947B

1234567891011121314151617181920212223242526272829303132333435
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. class Exception extends Error {
  4. constructor(message) {
  5. super(message);
  6. this.name = 'Exception';
  7. this.message = message;
  8. this.stack = (new Error()).stack || '';
  9. }
  10. toString() {
  11. return `${this.name}: ${this.message}`;
  12. }
  13. }
  14. exports.Exception = Exception;
  15. class FatalException extends Exception {
  16. constructor(message = '', exitCode = 1) {
  17. super(message);
  18. this.message = message;
  19. this.exitCode = exitCode;
  20. this.fatal = true;
  21. }
  22. }
  23. exports.FatalException = FatalException;
  24. class ShellException extends Exception {
  25. constructor(message, exitCode = 0) {
  26. super(message);
  27. this.message = message;
  28. this.exitCode = exitCode;
  29. }
  30. }
  31. exports.ShellException = ShellException;
  32. class SessionException extends Exception {
  33. }
  34. exports.SessionException = SessionException;