@@ -300,16 +300,28 @@ export async function generateGraph(
300
300
sourceMaps = projectGraphAndSourceMaps . sourceMaps ;
301
301
} catch ( e ) {
302
302
if ( e instanceof ProjectGraphError ) {
303
- output . warn ( {
304
- title : 'Failed to process project graph. Showing partial graph.' ,
305
- } ) ;
306
303
rawGraph = e . getPartialProjectGraph ( ) ;
307
304
sourceMaps = e . getPartialSourcemaps ( ) ;
308
305
309
306
isPartial = true ;
310
307
}
311
308
if ( ! rawGraph ) {
312
309
handleProjectGraphError ( { exitOnError : true } , e ) ;
310
+ } else {
311
+ const errors = e . getErrors ( ) ;
312
+ if ( errors ?. length > 0 ) {
313
+ errors . forEach ( ( e ) => {
314
+ output . error ( {
315
+ title : e . message ,
316
+ bodyLines : [ e . stack ] ,
317
+ } ) ;
318
+ } ) ;
319
+ }
320
+ output . warn ( {
321
+ title : `${
322
+ errors ?. length > 1 ? `${ errors . length } errors` : `An error`
323
+ } occured while processing the project graph. Showing partial graph.`,
324
+ } ) ;
313
325
}
314
326
}
315
327
let prunedGraph = pruneExternalNodes ( rawGraph ) ;
@@ -708,6 +720,21 @@ function createFileWatcher() {
708
720
currentProjectGraphClientResponse . hash &&
709
721
sourceMapResponse
710
722
) {
723
+ if ( projectGraphClientResponse . errors ?. length > 0 ) {
724
+ projectGraphClientResponse . errors . forEach ( ( e ) => {
725
+ output . error ( {
726
+ title : e . message ,
727
+ bodyLines : [ e . stack ] ,
728
+ } ) ;
729
+ } ) ;
730
+ output . warn ( {
731
+ title : `${
732
+ projectGraphClientResponse . errors . length > 1
733
+ ? `${ projectGraphClientResponse . errors . length } errors`
734
+ : `An error`
735
+ } occured while processing the project graph. Showing partial graph.`,
736
+ } ) ;
737
+ }
711
738
output . note ( { title : 'Graph changes updated.' } ) ;
712
739
713
740
currentProjectGraphClientResponse = projectGraphClientResponse ;
0 commit comments