使用CI捕获SIGNAL SQLSTATE消息

I am using a stored procedure for login to my website and I am displaying different messages on different conditions for different users in my stored procedure.

Now I don't want to show these MySQL error messages to my user, I want to display normal message. So can anyone tell me how to catch these error message.

I am using codeIgniter (PHP) framework.

Here is the code I have tried :

public function authenticate($email, $password) { 
       $query = ""; 
       try
       { 
          $query = $this->db->query('CALL LOGIN("'.$email.'","'.$password.'")'); 
          if($query->num_rows() == 1) 
          { /* do some thing here */ } 
       }catch(Exception $e)
        { echo $e;} 
  }  

To catch errors raised by SIGNAL, use GET DIAGNOSTICS inside an exception handler

http://dev.mysql.com/doc/refman/5.6/en/get-diagnostics.html