1: <?php
 2: 
 3: /**
 4:  * Exception thrown when an EMS callback cannot be interpreted
 5:  */
 6: class Syspay_Merchant_EMSException extends RuntimeException
 7: {
 8:     const CODE_MISSING_HEADER   = 0;
 9:     const CODE_INVALID_CHECKSUM = 1;
10:     const CODE_INVALID_CONTENT  = 2;
11:     const CODE_UNKNOWN          = 3;
12:     const CODE_UNKNOWN_MERCHANT = 5;
13: 
14:     public function __construct($message = '', $code = 0, $previous = null)
15:     {
16:         if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
17:             parent::__construct($message, $code, $previous);
18:         } else {
19:             parent::__construct($message, $code);
20:         }
21:     }
22: }
23: