Skip to content

Commit 0c9186c

Browse files
committed
fix(clients): rethrow generic exceptions when generating commit message
It's better if the generic exceptions are thrown and handled by the IDE since users can then report the whole stack trace.
1 parent 2c3cae8 commit 0c9186c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
### Changed
6+
7+
- Rethrow generic exceptions when generating commit messages.
8+
59
## [2.2.0] - 2024-08-01
610

711
### Added

src/main/kotlin/com/github/blarc/ai/commits/intellij/plugin/settings/clients/LLMClientService.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ abstract class LLMClientService<T : LLMClientConfiguration>(private val cs: Coro
7171
onError(message("settings.verify.invalid", e.message ?: message("unknown-error")))
7272
} catch (e: Exception) {
7373
onError(e.message ?: message("unknown-error"))
74+
// Generic exceptions should be logged by the IDE for easier error reporting
75+
throw e
7476
}
7577
}
7678
}

0 commit comments

Comments
 (0)