I'm trying to create custom exception class for codeigniter. Here is my code:
class Ci_exception extends Exception {
var $CI;
function __construct()
{
$this->CI =& get_instance();
}
public function errorMessage()
{
log_message('error', $this->getMessage());
return $this->getMessage();
}
}
This custom class works fine if there is no constructor method. With the construct method the $this->getMessage() method doesn't return any message. Can anyone explain why?