MentraOS / mobile /modules /engine /src /utils /reportAbort.ts
Anirudh1950's picture
Add files using upload-large-folder tool
e079a73 verified
Raw History Blame Contribute Delete
269 Bytes
/** React Native AbortSignal does not provide throwIfAborted. */
export function assertReportNotAborted(signal?: AbortSignal): void {
if (!signal?.aborted) return
const error = new Error("Incident report aborted")
error.name = "AbortError"
throw error
}