| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using Quadarax.Foundation.Core.Exceptions;
- namespace Quadarax.Application.QLiberace.Common
- {
- public class ExceptionLibrary : ExceptionCodes
- {
- protected override void OnSetupCodes()
- {
- AddCode(ExceptionsCodes.ValidationErrorsCode, ExceptionsCodes.ValidationErrorsMsg);
- AddCode(ExceptionsCodes.SettingsNotFoundCode, ExceptionsCodes.SettingsNotFoundMsg);
- AddCode(ExceptionsCodes.SettingsNotFoundForModuleCode, ExceptionsCodes.SettingsNotFoundForModuleMsg);
- AddCode(ExceptionsCodes.SettingsHasNoPropertyCode, ExceptionsCodes.SettingsHasNoPropertyMsg);
- AddCode(ExceptionsCodes.SettingsAlreadyExistsCode, ExceptionsCodes.SettingsAlreadyExistsMsg);
- AddCode(ExceptionsCodes.TenantNotFoundCode, ExceptionsCodes.TenantNotFoundMsg);
- AddCode(ExceptionsCodes.TenantAlreadyExistsCode, ExceptionsCodes.TenantAlreadyExistsMsg);
- AddCode(ExceptionsCodes.TenantLockedCode, ExceptionsCodes.TenantLockedMsg);
- AddCode(ExceptionsCodes.TenantDifferentContextCode, ExceptionsCodes.TenantDifferentContextMsg);
- AddCode(ExceptionsCodes.UserNotFoundCode, ExceptionsCodes.UserNotFoundMsg);
- AddCode(ExceptionsCodes.UserAlreadyExistsCode, ExceptionsCodes.UserAlreadyExistsMsg);
- }
- public static class ExceptionsCodes
- {
- public const string ValidationErrorsMsg = "Validation errors follows:";
- public const int ValidationErrorsCode = 1000;
- public const string SettingsNotFoundMsg = "Setting '{0}' not found fo module '{1}'";
- public const int SettingsNotFoundCode = 10000;
- public const string SettingsNotFoundForModuleMsg = "Any setting not found for module '{0}'";
- public const int SettingsNotFoundForModuleCode = 10001;
- public const string SettingsHasNoPropertyMsg = "Setting '{0}' has no defined property in class '{1}'";
- public const int SettingsHasNoPropertyCode = 10002;
- public const string SettingsAlreadyExistsMsg = "Setting '{0}' for module '{1}' already exists.";
- public const int SettingsAlreadyExistsCode = 10003;
- public const string TenantNotFoundMsg = "Tenant with identifier {0}='{1}' not found";
- public const int TenantNotFoundCode = 10010;
- public const string TenantAlreadyExistsMsg = "Tenant with code '{0}' already exists";
- public const int TenantAlreadyExistsCode = 10011;
- public const string TenantLockedMsg = "Tenant with code '{0}' is LOCKED! Cannot access.";
- public const int TenantLockedCode = 10012;
- public const string TenantDifferentContextMsg = "Cannot update different Tenant with code '{0}' in tenant context '{1}'";
- public const int TenantDifferentContextCode = 10013;
- public const string UserNotFoundMsg = "User with identifier {0}='{1}' not found";
- public const int UserNotFoundCode = 10020;
- public const string UserAlreadyExistsMsg = "User with login name '{0}' already exists";
- public const int UserAlreadyExistsCode = 10021;
-
- }
- }
- }
|