/// <summary> /// Creates a new instance of the <see cref="FacebookApiException"/> class. /// </summary> /// <param name="info"> /// The <see cref="System.Runtime.Serialization.SerializationInfo"/> /// that holds the serialized object data about the exception being thrown. /// </param> /// <param name="context"> /// The <see cref="System.Runtime.Serialization.StreamingContext"/> /// that contains contextual information about the source or destination. /// </param> protected FacebookApiException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info != null) { this.error = (FacebookApiError)info.GetValue("Error", typeof(FacebookApiError)); } }
/// <summary> /// Creates a new instance of the <see cref="FacebookApiException"/> class. /// </summary> /// <param name="message">A message about the exception.</param> /// <param name="innerException">The inner exception that is the cause of the current exception.</param> public FacebookApiException(string message, Exception innerException) : base(message, innerException) { this.error = FacebookApiError.Unknown; }
/// <summary> /// Creates a new instance of the <see cref="FacebookApiException"/> class. /// </summary> /// <param name="message">A message about the exception.</param> /// <param name="error">The Facebook error.</param> public FacebookApiException(string message, FacebookApiError error) : base(message) { this.error = error; }