Skip to content

Commit 356081d

Browse files
authored
Stop manually setting stacktrace limit (#84968)
1 parent 014228f commit 356081d

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

packages/next/src/server/config.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1971,18 +1971,7 @@ async function validateConfigSchema(
19711971
}
19721972

19731973
const fullErrorMessage = errorMessages.join('\n')
1974-
1975-
let err: Error
1976-
// Hide the stack trace for this error as the trace is not useful here.
1977-
const stackTraceLimit = Error.stackTraceLimit
1978-
Error.stackTraceLimit = 0
1979-
try {
1980-
err = new Error(fullErrorMessage)
1981-
} finally {
1982-
Error.stackTraceLimit = stackTraceLimit
1983-
}
1984-
1985-
throw err
1974+
throw new Error(fullErrorMessage)
19861975
}
19871976
}
19881977
}

0 commit comments

Comments
 (0)