Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

jsarnowski / jsarnowski/brizy-pro   php

Repository URL to install this package:

Version: 2.3.7 

/ activecampaign / api-php / includes / exceptions / RequestException.php

<?php

class RequestException extends \Exception {
	
	private $failedRequestMessage;

	/**
	 * @param string message	Response error message from the server.
	 *
	 * Set the failure message for this exception.
	 */
	public function setFailedMessage($message) {
		$this->failedRequestMessage = $message;
		$this->message = sprintf('An unexpected problem occurred with the API request. Some causes include: invalid JSON or XML returned. Here is the actual response from the server: ---- %s', $message);
	}

	/**
	 * @return string	Response error message from the server.
	 *
	 * Get the failure message for this exception.
	 */
	public function getFailedMessage() {
		return $this->failedRequestMessage;
	}
}