Skip to content

Commit

Permalink
Updated the HeaderParseException message #84
Browse files Browse the repository at this point in the history
  • Loading branch information
hsz committed Oct 18, 2022
1 parent e4f8f81 commit da030f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) } ?: "")
)

0 comments on commit da030f6

Please sign in to comment.