var _a, _b, _c, _d, _e, _f; // -----------------------------------------------------------------------------
// Fiber Failure
// -----------------------------------------------------------------------------
// TODO(Mike/Max): implementation
// import { pretty } from "./Pretty"


export const FiberFailureSymbol = /*#__PURE__*/Symbol.for("@effect/core/Cause/errors/FiberFailure");
export class FiberFailure extends Error {
  // readonly pretty = pretty(this.cause)
  constructor(cause) {
    super();
    this.cause = cause;
    this[_a] = "FiberFailure";
    this.name = this[FiberFailureSymbol];
    delete this.stack;
  }

}
_a = FiberFailureSymbol;
export function isFiberFailure(u) {
  return u instanceof Error && u[FiberFailureSymbol] === "FiberFailure";
} // // -----------------------------------------------------------------------------
// // Untraced
// // -----------------------------------------------------------------------------
// export const UntracedSymbol: unique symbol = Symbol.for(
//   "@effect/core/Cause/errors/Untraced"
// )
// export class Untraced extends Error {
//   readonly [UntracedSymbol] = "Untraced"
//   constructor(message?: string) {
//     super(message)
//     delete this.stack
//     this.name = this[UntracedSymbol]
//   }
// }
// export const isUntraced = (u: unknown): u is Untraced =>
//   u instanceof Error && u[UntracedSymbol] === "Untraced"
// -----------------------------------------------------------------------------
// Runtime
// -----------------------------------------------------------------------------

export const RuntimeErrorSymbol = /*#__PURE__*/Symbol.for("@effect/core/Cause/errors/Runtime");
export class RuntimeError {
  constructor(message) {
    this.message = message;
    this[_b] = "RuntimeError";
  }

}
_b = RuntimeErrorSymbol;
export function isRuntime(u) {
  return u instanceof RuntimeError && u[RuntimeErrorSymbol] === "RuntimeError";
} // -----------------------------------------------------------------------------
// Channel
// -----------------------------------------------------------------------------

export const ChannelErrorSymbol = /*#__PURE__*/Symbol.for("@effect/core/Cause/errors/Channel");
export class ChannelError {
  constructor(error) {
    this.error = error;
    this[_c] = ChannelErrorSymbol;
  }

}
_c = ChannelErrorSymbol;
export function isChannelError(u) {
  return typeof u === "object" && u != null && ChannelErrorSymbol in u;
} // -----------------------------------------------------------------------------
// Interrupted
// -----------------------------------------------------------------------------

export const InterruptedSymbol = /*#__PURE__*/Symbol.for("@effect/core/Cause/errors/Interrupted");
export class InterruptedException extends Error {
  constructor(message) {
    super(message);
    this[_d] = "InterruptedException";
    this.name = this[InterruptedSymbol];
  }

}
_d = InterruptedSymbol;
export function isInterruptedException(u) {
  return u instanceof Error && u[InterruptedSymbol] === "InterruptedException";
} // -----------------------------------------------------------------------------
// Illegal State
// -----------------------------------------------------------------------------

export const IllegalStateExceptionSymbol = /*#__PURE__*/Symbol.for("@effect/core/Cause/errors/IllegalState");
export class IllegalStateException extends Error {
  constructor(message) {
    super(message);
    this[_e] = "IllegalStateException";
    this.name = this[IllegalStateExceptionSymbol];
  }

}
_e = IllegalStateExceptionSymbol;
export function isIllegalStateException(u) {
  return u instanceof Error && u[IllegalStateExceptionSymbol] === "IllegalStateException";
} // -----------------------------------------------------------------------------
// Illegal Argument
// -----------------------------------------------------------------------------

export const IllegalArgumentExceptionSymbol = /*#__PURE__*/Symbol.for("@effect/core/Cause/errors/IllegalArgument");
export class IllegalArgumentException extends Error {
  constructor(message) {
    super(message);
    this[_f] = "IllegalArgumentException";
    this.name = this[IllegalArgumentExceptionSymbol];
  }

}
_f = IllegalArgumentExceptionSymbol;
export function isIllegalArgumentException(u) {
  return u instanceof Error && u[IllegalArgumentExceptionSymbol] === "IllegalArgumentException";
}
//# sourceMappingURL=errors.mjs.map