/// <summary> /// Translates error codes into human-readable messages /// </summary> /// <param name="errorCode">The error code for which to retrieve an error message</param> /// <returns> /// A string containing detail about the given error code /// </returns> public static string GetErrorMsg(WmauErrorCodes errorCode) { if (m_errorMsgs.ContainsKey(errorCode)) { return(Properties.Resources.ERROR + " " + (int)errorCode + ": " + m_errorMsgs[errorCode]); } else { return(string.Empty); } }
/// <summary> /// Creates a new WmauException /// </summary> /// <param name="errorCode">An error code describing specifically what caused this exception</param> /// <param name="ex">An exception that was the root cause of this one</param> public WmauException(WmauErrorCodes errorCode, Exception ex) : base(string.Empty, ex) { m_errorDetails = new WmauError(errorCode); }
/// <summary> /// Creates a new WmauException /// </summary> /// <param name="errorCode">An error code describing specifically what caused this exception</param> public WmauException(WmauErrorCodes errorCode) { m_errorDetails = new WmauError(errorCode); }
/// <summary> /// Constructor; initializes the error object with an error code /// </summary> /// <param name="errorCode">The error code associated with this object</param> public WmauError(WmauErrorCodes errorCode) { this.ErrorCode = errorCode; }