Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// generated file, run scripts/builderrors.mjs to update | ||
export const errors: Record<string, string> = { | ||
"loopback-rx-ovf": "Loopback buffer overflow" | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env zx | ||
|
||
import "zx/globals" | ||
|
||
const md = await fs.readFile("./website/docs/developer/errors.mdx", { | ||
encoding: "utf-8", | ||
}) | ||
const ts = | ||
(await fs.exists("./interop/src/errors.ts")) && | ||
(await fs.readFile("./interop/src/errors.ts", { encoding: "utf-8" })) | ||
const rx = /^##\s+(?<name>.+)\s+\{#(?<id>[^}]+)\}/gim | ||
const errors = {} | ||
md.replace(rx, _ => { | ||
const m = rx.exec(_) | ||
const { name, id } = m.groups | ||
errors[id.toLowerCase()] = name | ||
return "" | ||
}) | ||
|
||
const fn = "./interop/src/errors.ts" | ||
const newTs = `// generated file, run scripts/builderrors.mjs to update | ||
export const errors: Record<string, string> = ${JSON.stringify( | ||
errors, | ||
null, | ||
2 | ||
)}; | ||
` | ||
if (ts !== newTs) { | ||
console.log(`writing ${fn}`) | ||
await fs.writeFile(fn, newTs, { encoding: "utf-8" }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
sidebar_position: 10000 | ||
title: Errors | ||
description: Troubleshooting DeviceScript errors | ||
--- | ||
|
||
# Errors | ||
|
||
## Loopback buffer overflow {#loopback-rx-ovf} | ||
|
||
The program is issuing requests to service client faster than the system can handle. |