From da030f6666663d1205a09de4abd2ac8621ee5763 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Tue, 18 Oct 2022 21:51:10 +0200 Subject: [PATCH] Updated the `HeaderParseException` message #84 --- CHANGELOG.md | 1 + .../jetbrains/changelog/exceptions/HeaderParseException.kt | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e9584c..ea503ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ ### Changed - Upgrade minimal required Gradle version to `6.8` - Make `withHeader` property of the `Changelog.Item` object `true` by default +- Updated the `HeaderParseException` message [#84](../../issues/84) ## [1.3.1] ### Changed diff --git a/src/main/kotlin/org/jetbrains/changelog/exceptions/HeaderParseException.kt b/src/main/kotlin/org/jetbrains/changelog/exceptions/HeaderParseException.kt index dee7d34..5ab2f2a 100644 --- a/src/main/kotlin/org/jetbrains/changelog/exceptions/HeaderParseException.kt +++ b/src/main/kotlin/org/jetbrains/changelog/exceptions/HeaderParseException.kt @@ -3,8 +3,7 @@ package org.jetbrains.changelog.exceptions class HeaderParseException(value: String, unreleasedTerm: String) : Exception( - "Header '$value' does not contain version number. " + ( - "Probably you want set unreleasedTerm to '$value'" - .takeIf { value.contains(unreleasedTerm) } ?: "" - ) + "Header '$value' does not contain version number. " + + "By default, SemVer format is required (i.e. 1.0.0). To use other formats, like '1.0', adjust the 'changelog.headerParserRegex' property. " + + ("Probably you want set unreleasedTerm to '$value'".takeIf { value.contains(unreleasedTerm) } ?: "") )