Skip to content

Commit

Permalink
enh: override invalid parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
huskar-t committed Apr 22, 2024
1 parent 7a84a08 commit 34a2148
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/TMQ/WebSocket/Consumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ public Consumer(ConsumerBuilder<TValue> builder)
_autoCommit = true;
if (!string.IsNullOrEmpty(_options.AutoCommitIntervalMs))
{
_autoCommitInterval = int.Parse(_options.AutoCommitIntervalMs);
try
{
_autoCommitInterval = int.Parse(_options.AutoCommitIntervalMs);
}
catch (Exception e)
{
throw new ArgumentException("Invalid auto commit interval", e);
}
}
else
{
Expand Down

0 comments on commit 34a2148

Please sign in to comment.