()
| 2 | import { html } from "../../public/generated/examples/GetErrorMessage.json"; |
| 3 | |
| 4 | export default function GetErrorMessageRoute() { |
| 5 | return ( |
| 6 | <Box direction="column" gap={4}> |
| 7 | <Header section="API" title="getErrorMessage helper" /> |
| 8 | <div> |
| 9 | Typically <em>thrown</em> errors in JavaScript are instances of type{" "} |
| 10 | <code>Error</code>, but{" "} |
| 11 | <ExternalLink href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/throw"> |
| 12 | this is not always the case |
| 13 | </ExternalLink> |
| 14 | . Any value can be thrown- strings, numbers, even <code>null</code> or{" "} |
| 15 | <code>undefined</code>. |
| 16 | </div> |
| 17 | <div> |
| 18 | To simplify working with thrown values, this library exports a utility |
| 19 | method called <code>getErrorMessage</code>. |
| 20 | </div> |
| 21 | <Code html={html} /> |
| 22 | </Box> |
| 23 | ); |
| 24 | } |
nothing calls this directly
no outgoing calls
no test coverage detected