"use strict"
var _a, _b, _c, _d, _e, _f
Object.defineProperty(exports, "__esModule", { value: true })
exports.isIllegalArgumentException =
  exports.IllegalArgumentException =
  exports.IllegalArgumentSymbol =
  exports.isIllegalStateException =
  exports.IllegalStateException =
  exports.IllegalStateSymbol =
  exports.isInterruptedException =
  exports.InterruptedException =
  exports.InterruptedSymbol =
  exports.isRuntime =
  exports.RuntimeError =
  exports.RuntimeSymbol =
  exports.isUntraced =
  exports.Untraced =
  exports.UntracedSymbol =
  exports.isFiberFailure =
  exports.FiberFailure =
  exports.FiberFailureSymbol =
    void 0
const Pretty_1 = require("./Pretty")
//
// @category FiberFailure
//
exports.FiberFailureSymbol = Symbol.for("@matechs/core/symbols/errors/FiberFailure")
class FiberFailure extends Error {
  constructor(cause) {
    super()
    this.cause = cause
    this[_a] = "FiberFailure"
    this.pretty = (0, Pretty_1.pretty)(this.cause)
    this.name = this[exports.FiberFailureSymbol]
    delete this.stack
  }
}
exports.FiberFailure = FiberFailure
_a = exports.FiberFailureSymbol
const isFiberFailure = (u) =>
  u instanceof Error && u[exports.FiberFailureSymbol] === "FiberFailure"
exports.isFiberFailure = isFiberFailure
//
// @category Untraced
//
exports.UntracedSymbol = Symbol.for("@matechs/core/symbols/errors/Untraced")
class Untraced extends Error {
  constructor(message) {
    super(message)
    this[_b] = "Untraced"
    delete this.stack
    this.name = this[exports.UntracedSymbol]
  }
}
exports.Untraced = Untraced
_b = exports.UntracedSymbol
const isUntraced = (u) => u instanceof Error && u[exports.UntracedSymbol] === "Untraced"
exports.isUntraced = isUntraced
//
// @category Runtime
//
exports.RuntimeSymbol = Symbol.for("@matechs/core/symbols/errors/Runtime")
class RuntimeError {
  constructor(message) {
    this.message = message
    this[_c] = "RuntimeError"
  }
}
exports.RuntimeError = RuntimeError
_c = exports.RuntimeSymbol
const isRuntime = (u) =>
  u instanceof RuntimeError && u[exports.RuntimeSymbol] === "RuntimeError"
exports.isRuntime = isRuntime
//
// @category Interrupted
//
exports.InterruptedSymbol = Symbol.for("@matechs/core/symbols/errors/Interrupted")
class InterruptedException extends Error {
  constructor(message) {
    super(message)
    this[_d] = "InterruptedException"
    this.name = this[exports.InterruptedSymbol]
  }
}
exports.InterruptedException = InterruptedException
_d = exports.InterruptedSymbol
const isInterruptedException = (u) =>
  u instanceof Error && u[exports.InterruptedSymbol] === "InterruptedException"
exports.isInterruptedException = isInterruptedException
//
// @category IllegalState
//
exports.IllegalStateSymbol = Symbol.for("@matechs/core/symbols/errors/IllegalState")
class IllegalStateException extends Error {
  constructor(message) {
    super(message)
    this[_e] = "IllegalStateException"
    this.name = this[exports.IllegalStateSymbol]
  }
}
exports.IllegalStateException = IllegalStateException
_e = exports.IllegalStateSymbol
const isIllegalStateException = (u) =>
  u instanceof Error && u[exports.IllegalStateSymbol] === "IllegalStateException"
exports.isIllegalStateException = isIllegalStateException
//
// @category IllegalState
//
exports.IllegalArgumentSymbol = Symbol.for(
  "@matechs/core/symbols/errors/IllegalArgument"
)
class IllegalArgumentException extends Error {
  constructor(message) {
    super(message)
    this[_f] = "IllegalArgumentException"
    this.name = this[exports.IllegalArgumentSymbol]
  }
}
exports.IllegalArgumentException = IllegalArgumentException
_f = exports.IllegalArgumentSymbol
const isIllegalArgumentException = (u) =>
  u instanceof Error && u[exports.IllegalArgumentSymbol] === "IllegalArgumentException"
exports.isIllegalArgumentException = isIllegalArgumentException
//# sourceMappingURL=errors.js.map
