From 5539bff61f9f26c0d9db590fc25ec26cea9c5521 Mon Sep 17 00:00:00 2001 From: Pieter Mees Date: Wed, 16 Aug 2023 11:41:51 +0200 Subject: [PATCH 1/3] Print exception stack trace for bad branch --- .../nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/kotlin/nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt b/src/main/kotlin/nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt index 49f689d8..4a768533 100644 --- a/src/main/kotlin/nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt +++ b/src/main/kotlin/nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt @@ -98,6 +98,7 @@ class GenerateSiteCommand : Subcommand( true } catch (e: Exception) { println("Bad Branch $branch") + e.printStackTrace() false } } From 368f275e4f70a7cfc1864c98ee69a3bf767c5bc7 Mon Sep 17 00:00:00 2001 From: Pieter Mees Date: Fri, 18 Aug 2023 13:15:17 +0200 Subject: [PATCH 2/3] Update GenerateSiteCommand.kt Only print error message, not full stack trace --- .../nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt b/src/main/kotlin/nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt index 4a768533..ee20f698 100644 --- a/src/main/kotlin/nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt +++ b/src/main/kotlin/nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt @@ -97,8 +97,8 @@ class GenerateSiteCommand : Subcommand( createStructurizrWorkspace(workspaceFileInRepo) true } catch (e: Exception) { - println("Bad Branch $branch") - e.printStackTrace() + errorMessage = e.message ?: "Unknown error" + println("Bad Branch $branch: $errorMessage") false } } From 532f9daec1723456c6eaae2339c6e90064b01534 Mon Sep 17 00:00:00 2001 From: Pieter Mees Date: Wed, 30 Aug 2023 15:59:17 +0200 Subject: [PATCH 3/3] Update src/main/kotlin/nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt Co-authored-by: Dirk Groot --- .../nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt b/src/main/kotlin/nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt index ee20f698..2d7cfddf 100644 --- a/src/main/kotlin/nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt +++ b/src/main/kotlin/nl/avisi/structurizr/site/generatr/GenerateSiteCommand.kt @@ -97,7 +97,7 @@ class GenerateSiteCommand : Subcommand( createStructurizrWorkspace(workspaceFileInRepo) true } catch (e: Exception) { - errorMessage = e.message ?: "Unknown error" + val errorMessage = e.message ?: "Unknown error" println("Bad Branch $branch: $errorMessage") false }