클래스: UnsupportedRootScalarSelectError
정의 위치: packages/db/src/errors.ts:494
상속
생성자
생성자
new UnsupportedRootScalarSelectError(): UnsupportedRootScalarSelectError;
정의 위치: packages/db/src/errors.ts:495
반환값
UnsupportedRootScalarSelectError
재정의된 메서드
QueryCompilationError.constructor
속성
발생 원인?
optional cause: unknown;
정의 위치: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26
상속받은 속성
메시지
message: string;
정의 위치: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077
상속받은 속성
name
name: string;
정의 위치: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076
상속받은 속성
스택 트레이스?
optional stack: string;
정의 위치: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078
상속받은 속성
stackTraceLimit
static stackTraceLimit: number;
정의 위치: node_modules/.pnpm/@types+node@25.2.2/node_modules/@types/node/globals.d.ts:67
Error.stackTraceLimit 속성은 스택 추적(new Error().stack 또는
Error.captureStackTrace(obj)에 의해 생성됨)에서 수집하는 스택 프레임 수를 지정합니다.
기본값은 10이지만 유효한 JavaScript 숫자로 설정할 수 있습니다. 값을 변경한
후 캡처되는 모든 스택 추적에 변경 사항이 적용됩니다.
숫자가 아닌 값으로 설정하거나 음수로 설정하면 스택 추적에서 어떤 프레임도 캡처하지 않습니다.
상속받은 속성
QueryCompilationError.stackTraceLimit
메서드
captureStackTrace()
static captureStackTrace(targetObject, constructorOpt?): void;
정의 위치: node_modules/.pnpm/@types+node@25.2.2/node_modules/@types/node/globals.d.ts:51
.stack 속성을 targetObject에 생성하며, 이 속성에 액세스하면
Error.captureStackTrace()이 호출된 코드 내 위치를 나타내는 문자열을 반환합니다.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
추적의 첫 번째 줄에는
${myObject.name}: ${myObject.message} 접두사가 붙습니다.
선택적 constructorOpt 인수는 함수를 허용합니다. 지정하면 생성된 스택 추적에서
constructorOpt 위의 모든 프레임(constructorOpt 포함)을 생략합니다.
constructorOpt 인수는 오류 생성의 구현 세부 정보를 사용자에게
숨기는 데 유용합니다. 예를 들면 다음과 같습니다:
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();
매개변수
targetObject
object
constructorOpt?
Function
반환값
void
상속받은 속성
QueryCompilationError.captureStackTrace
prepareStackTrace()
static prepareStackTrace(err, stackTraces): any;
정의 위치: node_modules/.pnpm/@types+node@25.2.2/node_modules/@types/node/globals.d.ts:55
매개변수
err
Error
stackTraces
CallSite[]
반환값
any
참조
https://v8.dev/docs/stack-trace-api#customizing-stack-traces