-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Hotfix][Duy] Allow admin to create staff
- Loading branch information
Showing
3 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Domus.Common.Exceptions; | ||
|
||
namespace Domus.Service.Exceptions; | ||
|
||
public class RoleNotFoundException : ArgumentException, INotFoundException | ||
{ | ||
private readonly string? _customMessage; | ||
public override string Message => _customMessage ?? Message; | ||
|
||
public RoleNotFoundException(string customMessage) | ||
{ | ||
_customMessage = customMessage; | ||
} | ||
|
||
public RoleNotFoundException() | ||
{ | ||
_customMessage = "Role not found"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters