Skip to content

Commit

Permalink
feat : add domain exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikoo-Asadnejad committed Oct 28, 2023
2 parents 6fce0f3 + 876e00f commit 1584e30
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
9 changes: 9 additions & 0 deletions Src/Product.Domain/Exceptions/DomainException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Product.Domain.Exceptions;

public abstract class DomainException : Exception
{
public DomainException(string message) : base(message)
{

}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Product.Domain.Constants.Messages;
namespace Product.Domain.Exceptions;

public sealed class InvalidIpException : Exception
public sealed class InvalidIpException : DomainException
{
public InvalidIpException() : base(message: ExceptionMessage.InvalidIp)
{
Expand Down

0 comments on commit 1584e30

Please sign in to comment.