Hyperlinkv0.8.0-beta.28

PlatformError

PlatformError.systemErrorconsteffect/PlatformError.ts:195
(options: {
  readonly _tag: SystemErrorTag
  readonly module: string
  readonly method: string
  readonly description?: string | undefined
  readonly syscall?: string | undefined
  readonly pathOrDescriptor?: string | number | undefined
  readonly cause?: unknown
}): PlatformError

Creates a PlatformError whose reason is a SystemError.

When to use

Use to adapt an operating-system or platform failure into the normalized platform error model.

constructors
export const systemError = (options: {
  readonly _tag: SystemErrorTag
  readonly module: string
  readonly method: string
  readonly description?: string | undefined
  readonly syscall?: string | undefined
  readonly pathOrDescriptor?: string | number | undefined
  readonly cause?: unknown
}): PlatformError => new PlatformError(new SystemError(options))