Skip to content

Commit

Permalink
Merge pull request #1 from runwhen-contrib/worker-changes
Browse files Browse the repository at this point in the history
Update worker exception handling
  • Loading branch information
jon-funk authored Dec 11, 2023
2 parents 5858172 + 7d88d33 commit 047268f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion worker/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ public static int Main(string[] args)
}
else
{ // Normal +1 vote requested
if (vote.vote == "a") {
try{
throw new Exception($"The Voter {vote.voter_id} failed to have its vote: {vote.vote} processed.");
}catch(Exception ex){
Console.WriteLine($"Exception Occured During Work: {ex}");
}
}
UpdateVote(pgsql, vote.voter_id, vote.vote);
}
}
Expand Down Expand Up @@ -151,4 +158,4 @@ private static void UpdateVote(NpgsqlConnection connection, string voterId, stri
}
}
}
}
}

0 comments on commit 047268f

Please sign in to comment.