serialize(obj, context) {
		context.write(obj.message);
		context.write(obj.stack);
		context.write(
			/** @type {ErrorWithCause} */
			(obj).cause
		);
	}
@param {Error | EvalError | RangeError | ReferenceError | SyntaxError | TypeError} obj error
@param {ObjectSerializerContext} context context