@@ -40,6 +40,7 @@ import * as option_ from "./internal/option.js"
4040import * as query from "./internal/query.js"
4141import * as runtime_ from "./internal/runtime.js"
4242import * as schedule_ from "./internal/schedule.js"
43+ import * as StackTraceLimit from "./internal/stackTraceLimit.js"
4344import * as internalTracer from "./internal/tracer.js"
4445import type * as Layer from "./Layer.js"
4546import type * as LogLevel from "./LogLevel.js"
@@ -13509,10 +13510,7 @@ export const Tag: <const Id extends string>(id: Id) => <
1350913510 : [ X ] extends [ PromiseLike < infer A > ] ? Effect < A , Cause . UnknownException , Self >
1351013511 : Effect < X , never , Self >
1351113512 } = ( id ) => ( ) => {
13512- const limit = Error . stackTraceLimit
13513- Error . stackTraceLimit = 2
13514- const creationError = new Error ( )
13515- Error . stackTraceLimit = limit
13513+ const creationError = StackTraceLimit . withStackTraceLimit ( 2 , ( ) => new Error ( ) )
1351613514 function TagClass ( ) { }
1351713515 Object . setPrototypeOf ( TagClass , TagProto )
1351813516 TagClass . key = id
@@ -13668,10 +13666,7 @@ export const Service: <Self = never>() => [Self] extends [never] ? MissingSelfGe
1366813666 return function ( ) {
1366913667 const [ id , maker ] = arguments
1367013668 const proxy = "accessors " in maker ? maker [ "accessors "] : false
13671- const limit = Error . stackTraceLimit
13672- Error . stackTraceLimit = 2
13673- const creationError = new Error ( )
13674- Error . stackTraceLimit = limit
13669+ const creationError = StackTraceLimit . withStackTraceLimit ( 2 , ( ) => new Error ( ) )
1367513670
1367613671 let patchState : "unchecked" | "plain" | "patched" = "unchecked"
1367713672 const TagClass : any = function ( this : any , service : any ) {
@@ -14628,16 +14623,10 @@ export const fn:
1462814623 name : string ,
1462914624 options ?: Tracer . SpanOptions
1463014625 ) => fn . Gen & fn . NonGen ) = function ( nameOrBody : Function | string , ...pipeables : Array < any > ) {
14631- const limit = Error . stackTraceLimit
14632- Error . stackTraceLimit = 2
14633- const errorDef = new Error ( )
14634- Error . stackTraceLimit = limit
14626+ const errorDef = StackTraceLimit . withStackTraceLimit ( 2 , ( ) => new Error ( ) )
1463514627 if ( typeof nameOrBody !== "string" ) {
1463614628 return defineLength ( nameOrBody . length , function ( this : any , ...args : Array < any > ) {
14637- const limit = Error . stackTraceLimit
14638- Error . stackTraceLimit = 2
14639- const errorCall = new Error ( )
14640- Error . stackTraceLimit = limit
14629+ const errorCall = StackTraceLimit . withStackTraceLimit ( 2 , ( ) => new Error ( ) )
1464114630 return fnApply ( {
1464214631 self : this ,
1464314632 body : nameOrBody ,
@@ -14659,10 +14648,7 @@ export const fn:
1465914648 body . length ,
1466014649 ( {
1466114650 [ name ] ( this : any , ...args : Array < any > ) {
14662- const limit = Error . stackTraceLimit
14663- Error . stackTraceLimit = 2
14664- const errorCall = new Error ( )
14665- Error . stackTraceLimit = limit
14651+ const errorCall = StackTraceLimit . withStackTraceLimit ( 2 , ( ) => new Error ( ) )
1466614652 return fnApply ( {
1466714653 self : this ,
1466814654 body,
0 commit comments