INNER CODE UNIT · TypeScript

formatError

libnyanpasu/clash-nyanpasu · frontend/nyanpasu/src/utils/index.ts:10

export function formatError(err: unknown, profileLabel?: ProfileLabel): string {
  if (isIpcError(err)) {
    return ipcErrorMessage(err, profileLabel)
  }
  return err instanceof Error ? err.message : String(err)
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…