public UserException(UserErrorDetails userErrorDetails, Exception innerException) : base(userErrorDetails.UserMessage, innerException) { Init(userErrorDetails.ErrorCode, userErrorDetails.RawUserMessage, userErrorDetails.RawUserMessageArgs); }
public void NotNullOrEmpty(string s, UserErrorDetails userErrorDetails, string sysMessage) { Require(!string.IsNullOrEmpty(s), userErrorDetails, sysMessage); }
public UserException(UserErrorDetails userErrorDetails, string sysMessage) : base(userErrorDetails.UserMessage, new Exception(sysMessage)) { Init(userErrorDetails.ErrorCode, userErrorDetails.RawUserMessage, userErrorDetails.RawUserMessageArgs); }
public void Invariant(bool conditionAssert, UserErrorDetails userErrorDetails, string sysMessage) { if (!conditionAssert) { if (userErrorDetails == null) { throw new Exception(sysMessage); } else { throw new UserException(userErrorDetails, sysMessage); } } }
public void Ensure(bool postConditionAssert, UserErrorDetails userErrorDetails, string sysMessage) { Invariant(postConditionAssert, userErrorDetails, sysMessage); }
public void Require(bool preConditionAssert, UserErrorDetails userErrorDetails, string sysMessage) { Invariant(preConditionAssert, userErrorDetails, sysMessage); }
public void ValidObject(object obj, UserErrorDetails userErrorDetails, string sysMessage) { Require(obj != null, userErrorDetails, sysMessage); }
public void ValidID(long id, UserErrorDetails userErrorDetails, string sysMessage) { Require(IsValidID(id), userErrorDetails, sysMessage); }