Skip to content

Commit 4414f40

Browse files
committed
feat: improved error output
1 parent 3c0539c commit 4414f40

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

FossyApiDemo/MainForm.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private void MainFormLoad(object sender, EventArgs e)
119119
this.txtFossyUrl.Text = "http://localhost:8081/repo/api/v1";
120120
this.txtToken.Text = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NDc0NzUxOTksIm5iZiI6MTY0NzEyOTYwMCwianRpIjoiTXk0eiIsInNjb3BlIjoid3JpdGUifQ.DSDQDyodi5LgIUyqUbOKQiMtpoqOkI0RnF-uphwI_0A";
121121
this.txtFolder.Text = "TestFolder";
122-
this.txtFile.Text = @"..\..\..\TestData\fetch-retry-master.zip";
122+
this.txtFile.Text = @"..\..\..\..\TestData\fetch-retry-master.zip";
123123
#endif
124124
this.InitializeStatusDisplay();
125125
log.Info("Ready.");
@@ -399,7 +399,7 @@ private async Task<int> StartJob()
399399
{
400400
if (fex.HttpStatusCode != HttpStatusCode.NotFound)
401401
{
402-
log.Error("Error starting jobs: ", fex);
402+
log.Error($"Error starting jobs: {fex.Message}", fex);
403403
return -1;
404404
} // if
405405

@@ -410,7 +410,7 @@ private async Task<int> StartJob()
410410
}
411411
catch (Exception ex)
412412
{
413-
log.Error("Error starting jobs: ", ex);
413+
log.Error($"Error starting jobs: {ex.Message}", ex);
414414
return -1;
415415
}
416416
} // while
@@ -522,7 +522,7 @@ private async Task<bool> ProcessFile(string fileName)
522522
}
523523
catch (Exception ex)
524524
{
525-
log.Error("Error processing file: ", ex);
525+
log.Error($"Error processing file: {ex.Message}", ex);
526526
return false;
527527
} // catch
528528
} // ProcessFile()
@@ -553,7 +553,7 @@ private async Task<bool> DownloadReport(string reportFilename)
553553
}
554554
catch (Exception ex)
555555
{
556-
log.Error("Error downloading report ", ex);
556+
log.Error($"Error downloading report {ex.Message}", ex);
557557
} // catch
558558
} // while
559559

@@ -667,7 +667,7 @@ private bool CheckFolder()
667667
}
668668
catch (Exception ex)
669669
{
670-
log.Error("Error accessing Fossology folder: ", ex);
670+
log.Error($"Error accessing Fossology folder: {ex.Message}", ex);
671671
} // catch
672672

673673
return false;

0 commit comments

Comments
 (0)