Throw and catch PaymentProcessorExceptions and give user feedback
[civicrm-core.git] / CRM / Contribute / Exception / InactiveContributionPageException.php
1 <?php
2
3 /**
4 * Created by PhpStorm.
5 * User: eileen
6 * Date: 8/12/2014
7 * Time: 10:33 AM
8 */
9 class CRM_Contribute_Exception_InactiveContributionPageException extends Exception {
10 private $id;
11
12 /**
13 * @param string $message
14 * @param int $id
15 */
16 public function __construct($message, $id) {
17 parent::__construct($message);
18 $this->id = $id;
19 CRM_Core_Error::debug_log_message('inactive contribution page access attempted - page number ' . $id);
20 }
21
22 /**
23 * Get Contribution page ID.
24 *
25 * @return int
26 */
27 public function getID() {
28 return $this->id;
29 }
30
31 }