예제 #1
0
 /// <inheritdoc />
 /// <summary>
 /// Creates a ButtplugException.
 /// </summary>
 /// <param name="aLogger">Logger to log exception error message through (gives type context for the message).</param>
 /// <param name="aMessage">Exception message.</param>
 /// <param name="aClass">Exception class, based on B******g Error Message Classes. (https://b******g-spec.docs.b******g.io/status.html#error)</param>
 /// <param name="aId">Message ID for the resulting B******g Error Message.</param>
 /// <param name="aInner">Optional inner exception.</param>
 public ButtplugException([NotNull] IButtplugLog aLogger, string aMessage, Error.ErrorClass aClass = Error.ErrorClass.ERROR_UNKNOWN, uint aId = ButtplugConsts.SystemMsgId, Exception aInner = null)
     : this(aMessage, aClass, aId, aInner)
 {
     ButtplugUtils.ArgumentNotNull(aLogger, nameof(aLogger));
     aLogger.Error(aMessage);
 }
예제 #2
0
 public static ButtplugException FromError(IButtplugLog aLogger, Error aMsg)
 {
     ButtplugUtils.ArgumentNotNull(aLogger, nameof(aLogger));
     aLogger.Error(aMsg.ErrorMessage);
     return(FromError(aMsg));
 }