123456789101112131415161718192021 |
- using Luticate2.Auth.Utils.Dbo.Result;
-
- namespace Luticate2.Auth.Utils.Exceptions
- {
- public static class LuExceptionsExtensions
- {
- public static void Throw<T>(this LuResult<T> result)
- {
- throw new LuResultException(result.To<object>());
- }
-
- public static LuResult<T> ThrowIfNotSuccess<T>(this LuResult<T> result)
- {
- if (!result)
- {
- result.Throw();
- }
- return result;
- }
- }
- }
|