/// <summary> /// Constructor from a custom exception. /// </summary> /// <param name="error">The error.</param> /// <param name="message">The message.</param> public CCPAPIResult(CCPAPIErrors error, string message) { m_error = error; m_errorMessage = message; m_exception = null; }
/// <summary> /// Constructor from an XML serialization exception wrapped into an InvalidOperationException /// </summary> /// <param name="exception">The exception.</param> public CCPAPIResult(InvalidOperationException exception) : this(exception as Exception) { m_error = CCPAPIErrors.Xml; }
/// <summary> /// Constructor from an XSLT exception /// </summary> /// <param name="exception">The exception.</param> public CCPAPIResult(XsltException exception) : this(exception as Exception) { m_error = CCPAPIErrors.Xslt; }
/// <summary> /// Constructor from an XML exception /// </summary> /// <param name="exception">The exception.</param> public CCPAPIResult(XmlException exception) : this((Exception)exception) { m_error = CCPAPIErrors.Xml; }
/// <summary> /// Constructor from an http exception /// </summary> /// <param name="exception">The exception.</param> public CCPAPIResult(HttpWebClientServiceException exception) : this(exception as Exception) { m_error = CCPAPIErrors.Http; }
/// <summary> /// Default constructor. /// </summary> public CCPAPIResult() { m_error = CCPAPIErrors.None; m_errorMessage = String.Empty; m_exception = null; }