-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathException.php
More file actions
28 lines (27 loc) · 859 Bytes
/
Exception.php
File metadata and controls
28 lines (27 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
* Phamlp exception.
* @author Chris Yates <chris.l.yates@gmail.com>
* @copyright Copyright (c) 2010 PBM Web Development
* @license http://phamlp.googlecode.com/files/license.txt
* @package PHamlP
*/
/**
* Phamlp exception class.
* Base class for PHamlP::Haml and PHamlP::Sass exceptions.
* Translates exception messages.
* @package PHamlP
*/
class Phamlp_Exception extends Exception {
/**
* Phamlp Exception.
* @param string Category (haml|sass)
* @param string Exception message
* @param array parameters to be applied to the message using <code>strtr</code>.
*/
public function __construct($category, $message, $params, $object) {
parent::__construct(Phamlp_Translate::t($category, $message, $params) .
(is_object($object) ? ": {$object->filename}::{$object->line}\nSource: {$object->source}" : '')
);
}
}