@@ -29,7 +29,7 @@ globalThis.Error= class extends ErrorOld{
2929 constructor ( message , options ) {
3030 super ( message , options ) ;
3131 const [ lm , ...l ] = Error . stackToList ( this . stack ) ;
32- const i = l . findIndex ( l => l . indexOf ( "nodejsscript" ) === - 1 || l . indexOf ( "nodejsscript/examples" ) !== - 1 ) ;
32+ const i = l . findIndex ( l => ! l . includes ( "nodejsscript" ) || l . startsWith ( "file://" ) ) ;
3333 const l_out = l . slice ( i ) . filter ( l => ! l . includes ( "node:internal" ) && ! l . includes ( "nodejsscript/bin/" ) && ! l . includes ( "async Promise.all (index 0)" ) ) ;
3434 if ( ! l_out . length ) l_out . push ( process . argv [ 1 ] ) ;
3535 this . stack = lm + Error . listToStack ( l_out ) ;
@@ -50,7 +50,7 @@ export class ProcessOutput extends Error {
5050 for ( const [ k , value ] of Object . entries ( rest ) )
5151 Reflect . defineProperty ( this , k , { value, writable : false } ) ;
5252 Reflect . defineProperty ( this , "exitCode" , { value : code , writable : false } ) ;
53- const combined = rest . stdout + ( rest . stderr ? "\n" + rest . stderr : "" ) ;
54- Reflect . defineProperty ( this , "toString" , { value : ( ) => combined , writable : false } ) ;
53+ const combined = ( ) => rest . stdout + ( rest . stderr ? "\n" + rest . stderr : "" ) ;
54+ Reflect . defineProperty ( this , "toString" , { value : combined , writable : false } ) ;
5555 }
5656}
0 commit comments