[eluser]jeffersonrpn[/eluser]
To show a error message in the user interface (view) I throw exceptions from the models to controller. But I can't create exceptions in the controller using
$this->load->model( 'My_exception' ); because this model don't extends a Model Class, but a Exception Class. Check the constructor method:
Code:
class My_exception extends Exception {
[...]
public function __construct( $message, $title, $level ) {
parent::__construct( $message );
$this->title = $title;
$this->level = $level;
}
[...]
}
How I can instance a model in the controller that don't extends a Model Class?