diff options
author | Kevin Chabowski <kevin@kch42.de> | 2015-04-14 22:37:15 +0200 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2015-04-14 22:37:15 +0200 |
commit | b52413dbb4d8333d5fe2a351780e20b04c4525a2 (patch) | |
tree | 2f539192bb1d6e330bfb5845b72a6131cf7bcdae /src/ste/ParseCompileError.php | |
parent | 31241a2ab9c97e09ddbd4fb9e41b4e2e756d8ed4 (diff) | |
download | ste-b52413dbb4d8333d5fe2a351780e20b04c4525a2.tar.gz ste-b52413dbb4d8333d5fe2a351780e20b04c4525a2.tar.bz2 ste-b52413dbb4d8333d5fe2a351780e20b04c4525a2.zip |
Trim whitespacedevelop
Diffstat (limited to 'src/ste/ParseCompileError.php')
-rw-r--r-- | src/ste/ParseCompileError.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ste/ParseCompileError.php b/src/ste/ParseCompileError.php index 5ee37c7..8a7c36b 100644 --- a/src/ste/ParseCompileError.php +++ b/src/ste/ParseCompileError.php @@ -6,14 +6,14 @@ class ParseCompileError extends \Exception { public $msg; public $tpl; public $off; - + public function __construct($msg, $tpl, $offset, $code = 0, $previous = NULL) { $this->msg = $msg; $this->tpl = $tpl; $this->off = $offset; $this->message = "$msg (Template $tpl, Offset $offset)"; } - + public function rewrite($code) { $line = substr_count(str_replace("\r\n", "\n", substr($code, 0, $this->off)), "\n") + 1; $this->message = "{$this->msg} (Template {$this->tpl}, Line $line)"; |