Skip to content

Commit

Permalink
BROKERS: GetErrorCode
Browse files Browse the repository at this point in the history
  • Loading branch information
rcruzfreelance committed Jul 28, 2024
1 parent 63d64b0 commit a2227bd
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// ----------------------------------------------------------------------------------
// Copyright (c) The Standard Organization: A coalition of the Good-Hearted Engineers
// ----------------------------------------------------------------------------------

using Npgsql;
using STX.EFxceptions.Abstractions.Brokers.DbErrorBroker;

namespace STX.EFxceptions.PostgreSQL.Base.Brokers.DbErrorBroker
{
public interface IPostgreSqlErrorBroker : IDbErrorBroker<NpgsqlException>
{ }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// ----------------------------------------------------------------------------------
// Copyright (c) The Standard Organization: A coalition of the Good-Hearted Engineers
// ----------------------------------------------------------------------------------

using Npgsql;

namespace STX.EFxceptions.PostgreSQL.Base.Brokers.DbErrorBroker
{
public class PostgreSqlErrorBroker : IPostgreSqlErrorBroker
{
public int GetErrorCode(NpgsqlException postgreSqlException) =>
postgreSqlException.ErrorCode;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,11 @@
<PackagePath></PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Npgsql" Version="8.0.3" />
<PackageReference Include="STX.EFxceptions.Abstractions" Version="0.1.6" />
<PackageReference Include="STX.EFxceptions.Core" Version="0.1.6" />
<PackageReference Include="STX.EFxceptions.Identity.Core" Version="0.1.6" />
</ItemGroup>
</Project>

0 comments on commit a2227bd

Please sign in to comment.