public SharpGenException(Result result, Exception?innerException = null) : this(ResultDescriptor.Find(result), innerException : innerException) { }
/// <summary> /// Initializes a new instance of the <see cref="T:SharpDX.SharpDXException"/> class. /// </summary> /// <param name="result">The error result code.</param> /// <param name="message">The message describing the exception.</param> /// <param name="args">formatting arguments</param> public SharpGenException(Result result, string message, params object[] args) : base(string.Format(CultureInfo.InvariantCulture, message, args)) { this.descriptor = ResultDescriptor.Find(result); HResult = (int)result; }
/// <summary> /// Initializes a new instance of the <see cref="T:SharpDX.SharpDXException"/> class. /// </summary> /// <param name="result">The error result code.</param> /// <param name="message">The message describing the exception.</param> public SharpGenException(Result result, string message) : base(message) { this.descriptor = ResultDescriptor.Find(result); HResult = (int)result; }
/// <summary> /// Initializes a new instance of the <see cref = "T:SharpDX.SharpDXException" /> class. /// </summary> /// <param name = "result">The result code that caused this exception.</param> public SharpGenException(Result result) : this(ResultDescriptor.Find(result)) { HResult = (int)result; }
/// <summary> /// Initializes a new instance of the <see cref = "T:SharpDX.SharpDXException" /> class. /// </summary> public SharpGenException() : base("A SharpDX exception occurred.") { this.descriptor = ResultDescriptor.Find(Result.Fail); HResult = (int)Result.Fail; }
/// <summary> /// Initializes a new instance of the <see cref = "T:SharpDX.SharpDXException" /> class. /// </summary> /// <param name = "message">The message describing the exception.</param> /// <param name = "innerException">The exception that caused this exception.</param> /// <param name="args">formatting arguments</param> public SharpGenException(string message, Exception innerException, params object[] args) : base(string.Format(CultureInfo.InvariantCulture, message, args), innerException) { this.descriptor = ResultDescriptor.Find(Result.Fail); HResult = (int)Result.Fail; }