@@ -281,6 +281,7 @@ export async function componentize(
281281 }
282282
283283 let postProcess ;
284+ let postProcessName ;
284285 if ( opts . enableAot ) {
285286 // Determine the weval bin path, possibly using a pre-downloaded version
286287 let wevalBin ;
@@ -302,6 +303,7 @@ export async function componentize(
302303 env . RUST_MIN_STACK = defaultMinStackSize ( ) ;
303304 }
304305
306+ postProcessName = `weval (${ wevalBin } )` ;
305307 postProcess = spawnSync (
306308 wevalBin ,
307309 [
@@ -323,6 +325,7 @@ export async function componentize(
323325 ) ;
324326 } else {
325327 const wizerBin = opts . wizerBin ?? wizer ;
328+ postProcessName = `wizer (${ wizerBin } )` ;
326329 postProcess = spawnSync (
327330 wizerBin ,
328331 [
@@ -345,9 +348,15 @@ export async function componentize(
345348 }
346349
347350 // If the wizer (or weval) process failed, parse the output and display to the user
348- if ( postProcess . status !== 0 ) {
349- let wizerErr = parseWizerStderr ( postProcess . stderr ) ;
350- let err = `Failed to initialize component:\n${ wizerErr } ` ;
351+ if ( postProcess . status !== 0 || postProcess . signal ) {
352+ let procErr = parseWizerStderr ( postProcess . stderr ) ;
353+ if ( postProcess . signal ) {
354+ procErr += `\nProcess was killed by signal: ${ postProcess . signal } ` ;
355+ }
356+ if ( postProcess . error ) {
357+ procErr += `\nProcess error: ${ postProcess . error . message } ` ;
358+ }
359+ let err = `Failed to initialize component (${ postProcessName } ):\n${ procErr } ` ;
351360 if ( debugBindings ) {
352361 err += `\n\nBinary and sources available for debugging at ${ workDir } \n` ;
353362 } else {
0 commit comments