Skip to content

Commit

Permalink
CODE RUB: Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdutoit committed Feb 4, 2024
1 parent 6d68e5a commit 0406402
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,30 @@ private async ValueTask<TOutput> TryCatch<TInput, TOutput>(
{
return await asyncFunction();
}
catch (Exception ex) when (ex is ISerializationValidationException)
catch (Exception exception) when (exception is ISerializationValidationException)
{
throw CreateValidationException(ex);
throw CreateValidationException(exception);
}
catch (Exception ex) when (ex is ISerializationDependencyValidationException)
catch (Exception exception) when (exception is ISerializationDependencyValidationException)
{
throw CreateValidationException(ex);
throw CreateValidationException(exception);
}
catch (Exception ex) when (ex is ISerializationDependencyException)
catch (Exception exception) when (exception is ISerializationDependencyException)
{
throw CreateDependencyException(ex);
throw CreateDependencyException(exception);
}
catch (Exception ex) when (ex is ISerializationServiceException)
catch (Exception exception) when (exception is ISerializationServiceException)
{
throw CreateServiceException(ex);
throw CreateServiceException(exception);
}
catch (Exception ex)
catch (Exception exception)
{
var uncatagorizedSerializationProviderException =
new UncatagorizedSerializationProviderException(
message: "Serialization provider not properly implemented. Uncatagorized errors found, " +
"contact the serialization provider owner for support.",
innerException: ex,
data: ex.Data);
innerException: exception,
data: exception.Data);

throw CreateUncatagorizedServiceException(uncatagorizedSerializationProviderException);
}
Expand Down

0 comments on commit 0406402

Please sign in to comment.