Advertisement
Dotunoyesanmi

error

May 9th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. <?php
  2.     class Errors{
  3.  
  4.         public function displayError(Exception $e){
  5.            
  6.             $trace = $e->getTrace();
  7.                     if($trace[0]['class'] != ""){
  8.                         $class = $trace[0]['class'];
  9.                         $method = $trace[0]['function'];
  10.                         $file = $trace[0]['file'];
  11.                         $line = $trace[0]['line'];
  12.                         $error_message = $e->getMessage().
  13.                         "<br /> Class/Method : ".$class." <==> ".$method.
  14.                         "<br /> File : ".$file.
  15.                         "<br /> Line : ".$line;
  16.                        
  17.                     }
  18.  
  19.                     return $error_message;
  20.         }
  21.     }
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement