| title | parseCS() |
|---|---|
| order | 2 |
Now typically you don't need to call this function manually (since its called by the ALLOW_cALLSITES option in .parse()), its still a very useful function.
FULL_ERROR(default:false): Includes the rest of the error object serialized. (same as in.parse())
try {
// some code that might throw an error
} catch (error) {
const parsed = Stacklyn.parseCS(error);
const rawFrames = parsed.callSites;
const sourceCode = rawFrames[0].sourceCode;
// do some stuff with the amazing info you just got about the misbehaving code
}If you want to know more about the output structure of this method, check out Output of .parse().