OptionaldocsOptionaloriginalThe exact cell value that triggered the error, truncated to 200 chars.
Actionable next-step suggestion — usually a config flag or a fix pattern.
StaticstackThe Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
OptionalcauseOptionalstackStaticcsvCreate a ParsingError for CSV format issues.
Optionalhint: stringStaticfieldCreate a ParsingError for field count mismatch.
The most common cause: an unquoted comma inside a cell. The hint
surfaces both the repairRowShifts opt-out and the quoting fix.
StaticunclosedCreate a ParsingError for unclosed quotes.
StaticinvalidCreate a ParsingError for invalid delimiter.
StaticcellCreate a ParsingError for a cell value that the parser couldn't process (e.g. fast-path engine bailout). Surfaces both the offending value and a hint pointing at the most likely fallback config.
Optionalhint: stringStaticfastCreate a ParsingError for fast-path engine bailout.
StaticcaptureCreates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
OptionalconstructorOpt: FunctionStaticprepare
Error for parsing/formatting issues.
Actionable shape: every parser-thrown ParsingError should carry as much locational context as is cheaply available — line, column, the offending cell value (truncated), and a human-readable hint that points at the most likely cause. The detailedMessage string built here is what users see in their console, in this layout: