File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
packages/stack-shared/src/utils Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,12 @@ export class TracedFreestyleSandboxes {
1717 'freestyle.nodeModules.count' : options ?. nodeModules ? Object . keys ( options . nodeModules ) . length . toString ( ) : '0' ,
1818 }
1919 } , async ( ) => {
20- return await this . freestyle . executeScript ( script , options ) ;
20+ try {
21+ return await this . freestyle . executeScript ( script , options ) ;
22+ } catch ( error ) {
23+ captureError ( "freestyle.executeScript" , error ) ;
24+ throw new StackAssertionError ( "Error executing script with Freestyle! " + errorToNiceString ( error ) , { cause : error } ) ;
25+ }
2126 } ) ;
2227 }
2328}
Original file line number Diff line number Diff line change @@ -340,7 +340,7 @@ export function runAsynchronously(
340340 promiseOrFunc ?. catch ( error => {
341341 options . onError ?.( error ) ;
342342 const newError = new StackAssertionError (
343- "Uncaught error in asynchronous function: " + error . toString ( ) ,
343+ "Uncaught error in asynchronous function: " + errorToNiceString ( error ) ,
344344 { cause : error } ,
345345 ) ;
346346 concatStacktraces ( newError , duringError ) ;
You can’t perform that action at this time.
0 commit comments