|
| 1 | +--- |
| 2 | +id: FnSelectWithGroupByError |
| 3 | +title: FnSelectWithGroupByError |
| 4 | +--- |
| 5 | + |
| 6 | +# Class: FnSelectWithGroupByError |
| 7 | + |
| 8 | +Defined in: [packages/db/src/errors.ts:436](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L436) |
| 9 | + |
| 10 | +## Extends |
| 11 | + |
| 12 | +- [`QueryCompilationError`](QueryCompilationError.md) |
| 13 | + |
| 14 | +## Constructors |
| 15 | + |
| 16 | +### Constructor |
| 17 | + |
| 18 | +```ts |
| 19 | +new FnSelectWithGroupByError(): FnSelectWithGroupByError; |
| 20 | +``` |
| 21 | + |
| 22 | +Defined in: [packages/db/src/errors.ts:437](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L437) |
| 23 | + |
| 24 | +#### Returns |
| 25 | + |
| 26 | +`FnSelectWithGroupByError` |
| 27 | + |
| 28 | +#### Overrides |
| 29 | + |
| 30 | +[`QueryCompilationError`](QueryCompilationError.md).[`constructor`](QueryCompilationError.md#constructor) |
| 31 | + |
| 32 | +## Properties |
| 33 | + |
| 34 | +### cause? |
| 35 | + |
| 36 | +```ts |
| 37 | +optional cause: unknown; |
| 38 | +``` |
| 39 | + |
| 40 | +Defined in: node \_modules/.pnpm/ [email protected]/node \_modules/typescript/lib/lib.es2022.error.d.ts:26 |
| 41 | + |
| 42 | +#### Inherited from |
| 43 | + |
| 44 | +[`QueryCompilationError`](QueryCompilationError.md).[`cause`](QueryCompilationError.md#cause) |
| 45 | + |
| 46 | +*** |
| 47 | + |
| 48 | +### message |
| 49 | + |
| 50 | +```ts |
| 51 | +message: string; |
| 52 | +``` |
| 53 | + |
| 54 | +Defined in: node \_modules/.pnpm/ [email protected]/node \_modules/typescript/lib/lib.es5.d.ts:1077 |
| 55 | + |
| 56 | +#### Inherited from |
| 57 | + |
| 58 | +[`QueryCompilationError`](QueryCompilationError.md).[`message`](QueryCompilationError.md#message) |
| 59 | + |
| 60 | +*** |
| 61 | + |
| 62 | +### name |
| 63 | + |
| 64 | +```ts |
| 65 | +name: string; |
| 66 | +``` |
| 67 | + |
| 68 | +Defined in: node \_modules/.pnpm/ [email protected]/node \_modules/typescript/lib/lib.es5.d.ts:1076 |
| 69 | + |
| 70 | +#### Inherited from |
| 71 | + |
| 72 | +[`QueryCompilationError`](QueryCompilationError.md).[`name`](QueryCompilationError.md#name) |
| 73 | + |
| 74 | +*** |
| 75 | + |
| 76 | +### stack? |
| 77 | + |
| 78 | +```ts |
| 79 | +optional stack: string; |
| 80 | +``` |
| 81 | + |
| 82 | +Defined in: node \_modules/.pnpm/ [email protected]/node \_modules/typescript/lib/lib.es5.d.ts:1078 |
| 83 | + |
| 84 | +#### Inherited from |
| 85 | + |
| 86 | +[`QueryCompilationError`](QueryCompilationError.md).[`stack`](QueryCompilationError.md#stack) |
| 87 | + |
| 88 | +*** |
| 89 | + |
| 90 | +### stackTraceLimit |
| 91 | + |
| 92 | +```ts |
| 93 | +static stackTraceLimit: number; |
| 94 | +``` |
| 95 | + |
| 96 | +Defined in: node \_modules/.pnpm/ @types[email protected]/node \_modules/ @types/node/globals.d.ts:67 |
| 97 | + |
| 98 | +The `Error.stackTraceLimit` property specifies the number of stack frames |
| 99 | +collected by a stack trace (whether generated by `new Error().stack` or |
| 100 | +`Error.captureStackTrace(obj)`). |
| 101 | + |
| 102 | +The default value is `10` but may be set to any valid JavaScript number. Changes |
| 103 | +will affect any stack trace captured _after_ the value has been changed. |
| 104 | + |
| 105 | +If set to a non-number value, or set to a negative number, stack traces will |
| 106 | +not capture any frames. |
| 107 | + |
| 108 | +#### Inherited from |
| 109 | + |
| 110 | +[`QueryCompilationError`](QueryCompilationError.md).[`stackTraceLimit`](QueryCompilationError.md#stacktracelimit) |
| 111 | + |
| 112 | +## Methods |
| 113 | + |
| 114 | +### captureStackTrace() |
| 115 | + |
| 116 | +```ts |
| 117 | +static captureStackTrace(targetObject, constructorOpt?): void; |
| 118 | +``` |
| 119 | +
|
| 120 | +Defined in: node\_modules/.pnpm/@[email protected]/node\_modules/@types/node/globals.d.ts:51 |
| 121 | +
|
| 122 | +Creates a `.stack` property on `targetObject`, which when accessed returns |
| 123 | +a string representing the location in the code at which |
| 124 | +`Error.captureStackTrace()` was called. |
| 125 | +
|
| 126 | +```js |
| 127 | +const myObject = {}; |
| 128 | +Error.captureStackTrace(myObject); |
| 129 | +myObject.stack; // Similar to `new Error().stack` |
| 130 | +``` |
| 131 | +
|
| 132 | +The first line of the trace will be prefixed with |
| 133 | +`${myObject.name}: ${myObject.message}`. |
| 134 | +
|
| 135 | +The optional `constructorOpt` argument accepts a function. If given, all frames |
| 136 | +above `constructorOpt`, including `constructorOpt`, will be omitted from the |
| 137 | +generated stack trace. |
| 138 | +
|
| 139 | +The `constructorOpt` argument is useful for hiding implementation |
| 140 | +details of error generation from the user. For instance: |
| 141 | +
|
| 142 | +```js |
| 143 | +function a() { |
| 144 | + b(); |
| 145 | +} |
| 146 | + |
| 147 | +function b() { |
| 148 | + c(); |
| 149 | +} |
| 150 | + |
| 151 | +function c() { |
| 152 | + // Create an error without stack trace to avoid calculating the stack trace twice. |
| 153 | + const { stackTraceLimit } = Error; |
| 154 | + Error.stackTraceLimit = 0; |
| 155 | + const error = new Error(); |
| 156 | + Error.stackTraceLimit = stackTraceLimit; |
| 157 | + |
| 158 | + // Capture the stack trace above function b |
| 159 | + Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace |
| 160 | + throw error; |
| 161 | +} |
| 162 | + |
| 163 | +a(); |
| 164 | +``` |
| 165 | +
|
| 166 | +#### Parameters |
| 167 | +
|
| 168 | +##### targetObject |
| 169 | +
|
| 170 | +`object` |
| 171 | +
|
| 172 | +##### constructorOpt? |
| 173 | +
|
| 174 | +`Function` |
| 175 | +
|
| 176 | +#### Returns |
| 177 | +
|
| 178 | +`void` |
| 179 | +
|
| 180 | +#### Inherited from |
| 181 | +
|
| 182 | +[`QueryCompilationError`](QueryCompilationError.md).[`captureStackTrace`](QueryCompilationError.md#capturestacktrace) |
| 183 | +
|
| 184 | +*** |
| 185 | +
|
| 186 | +### prepareStackTrace() |
| 187 | +
|
| 188 | +```ts |
| 189 | +static prepareStackTrace(err, stackTraces): any; |
| 190 | +``` |
| 191 | +
|
| 192 | +Defined in: node\_modules/.pnpm/@[email protected]/node\_modules/@types/node/globals.d.ts:55 |
| 193 | +
|
| 194 | +#### Parameters |
| 195 | +
|
| 196 | +##### err |
| 197 | +
|
| 198 | +`Error` |
| 199 | +
|
| 200 | +##### stackTraces |
| 201 | +
|
| 202 | +`CallSite`[] |
| 203 | +
|
| 204 | +#### Returns |
| 205 | +
|
| 206 | +`any` |
| 207 | +
|
| 208 | +#### See |
| 209 | +
|
| 210 | +https://v8.dev/docs/stack-trace-api#customizing-stack-traces |
| 211 | +
|
| 212 | +#### Inherited from |
| 213 | +
|
| 214 | +[`QueryCompilationError`](QueryCompilationError.md).[`prepareStackTrace`](QueryCompilationError.md#preparestacktrace) |
0 commit comments