Skip to content

Commit a6e02eb

Browse files
Merge pull request #373 from TransactionProcessing/deepsource-autofix-ffb56119
refactor: remove unused exception variables in catch clauses
2 parents 97d3ba7 + c82f4fb commit a6e02eb

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

Shared.EventStore/Aggregate/DomainEventFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public DomainEvent CreateDomainEvent(Guid aggregateId, ResolvedEvent @event)
5454
try{
5555
eventType = TypeMap.GetType(@event.Event.EventType);
5656
}
57-
catch(Exception ex){
58-
// Nothing here
57+
catch(Exception)
58+
{
5959
}
6060

6161
if (eventType == null)

Shared.EventStore/Aggregate/TypeMapConvertor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static IDomainEvent Convertor(Guid aggregateId, ResolvedEvent @event)
3939
{
4040
eventType = TypeMap.GetType(@event.Event.EventType);
4141
}
42-
catch (Exception ex)
42+
catch (Exception)
4343
{
4444
// Nothing here
4545
}

Shared.IntegrationTesting/BaseDockerHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ protected void CheckSqlConnection(IContainerService databaseServerContainer){
671671
connection.Close();
672672
this.Trace("SQL Server Container Running");
673673
}
674-
catch(SqlException ex){
674+
catch(SqlException){
675675
if (connection.State == ConnectionState.Open){
676676
connection.Close();
677677
}

Shared/Extensions/StringExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ public static Boolean TryParseJson<T>(this String obj, out T result)
2626
result = JsonConvert.DeserializeObject<T>(obj, settings);
2727
return true;
2828
}
29-
catch (JsonReaderException jrex)
29+
catch (JsonReaderException)
3030
{
3131
result = default(T);
3232
return false;
3333
}
34-
catch (JsonSerializationException jsex)
34+
catch (JsonSerializationException)
3535
{
3636
result = default(T);
3737
return false;

Shared/General/ConfigurationReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static T GetValueOrDefault<T>(String sectionName, String keyName, T defau
8888

8989
return (T)Convert.ChangeType(value, typeof(T));
9090
}
91-
catch (KeyNotFoundException kex)
91+
catch (KeyNotFoundException)
9292
{
9393
return defaultValue;
9494
}

0 commit comments

Comments
 (0)