Ejemplo n.º 1
0
        private static string CreateExceptionMessage(MollieErrorMessage error)
        {
            if (!String.IsNullOrEmpty(error.Field))
            {
                return($"Error occured in field: {error.Field} - {error.Message}");
            }

            return(error.Message);
        }
Ejemplo n.º 2
0
 public MollieApiException(string json) : base(ParseErrorMessage(json).ToString())
 {
     Details = ParseErrorMessage(json);
 }
Ejemplo n.º 3
0
 public MollieApiException(string json) : base(CreateExceptionMessage(ParseErrorJsonResponse(json)))
 {
     this.Details = ParseErrorJsonResponse(json);
 }
 public MollieApiException(string json) : base("Exception occured while communicating with Mollie API. View the Details property for more information")
 {
     this.Details = JsonConvert.DeserializeObject <MollieErrorMessage>(json);
 }