@@ -201,7 +201,7 @@ private static Boolean collectFilesToUpload(ScanTaskState state) {
201201 try {
202202 state .filesToUpload .add (Archiver .archive (state .taskContext .getRootDirectory (), state .includePaths , state .excludePaths , "files_to_scan" ));
203203 } catch (IOException e ) {
204- logError (state , "An error occurred while trying to archive source files" );
204+ logError (state , "An error occurred while trying to archive source files: %s" , e . toString () );
205205 return false ;
206206 }
207207
@@ -246,7 +246,7 @@ private static Boolean uploadFiles(ScanTaskState state) {
246246 logApiException (state , e );
247247 return false ;
248248 } catch (IOException e ) {
249- logError (state , "An error occurred while trying to archive source files" );
249+ logError (state , "An error occurred while trying to archive source files: %s" , e . toString () );
250250 return false ;
251251 }
252252
@@ -262,7 +262,7 @@ private static Boolean waitForCodeDxToBeReadyForAnalysis(ScanTaskState state) {
262262 try {
263263 Thread .sleep (1000 ); // Consider adding maximum wait time
264264 } catch (InterruptedException e ) {
265- logError (state , "An unexpected threading issue occurred. This could occur if the build is manually cancelled." );
265+ logError (state , "An unexpected threading issue occurred. This could occur if the build is manually cancelled. Exception: %s" , e . toString () );
266266 return false ;
267267 }
268268
@@ -351,7 +351,7 @@ private static Boolean waitForAnalysisToFinish(ScanTaskState state) {
351351 try {
352352 Thread .sleep (5000 ); // Consider adding maximum wait time
353353 } catch (InterruptedException e ) {
354- logError (state , "An unexpected threading issue occurred. This could occur if the build is manually cancelled." );
354+ logError (state , "An unexpected threading issue occurred. This could occur if the build is manually cancelled. Exception: %s" , e . toString () );
355355 return false ;
356356 }
357357
0 commit comments