1. Christian Salazar
  2. cruge

Source

cruge / components / CrugeException.php

Diff from to

File components/CrugeException.php

-<?php 
-/**	CrugeException
+<?php
+/**    CrugeException
 
-	centraliza la emision de excepciones, ayudando a traducir los mensajes usando CrugeTranslator
+centraliza la emision de excepciones, ayudando a traducir los mensajes usando CrugeTranslator
 
- 	@author: Christian Salazar H. <christiansalazarh@gmail.com> @bluyell
-	@license protected/modules/cruge/LICENCE
-*/
-class CrugeException extends CHttpException {
-	public $classParent;
-	public $extra;
-	public $code;
-	public function __construct($message,$code=500,$extra=""){
-		parent::__construct($code,$message);
-		$this->code = $code;
-		$this->extra = $extra;
-	}
-	public function __toString() {
-		/*
+@author: Christian Salazar H. <christiansalazarh@gmail.com> @bluyell
+@license protected/modules/cruge/LICENCE
+ */
+class CrugeException extends CHttpException
+{
+    public $classParent;
+    public $extra;
+    public $code;
+
+    public function __construct($message, $code = 500, $extra = "")
+    {
+        parent::__construct($code, $message);
+        $this->code = $code;
+        $this->extra = $extra;
+    }
+
+    public function __toString()
+    {
+        /*
         return $this->classParent . ": [{$this->code}]: ".CrugeTranslator::t($this->message)."\n".$extra;
-		*/
-		return CrugeTranslator::t($this->message)."<br/>".$this->code;
+        */
+        return CrugeTranslator::t($this->message) . "<br/>" . $this->code;
     }
 }