• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I customize database error handling in model classes?

[eluser]Daniel Peraza[/eluser]
Hello igniters!.

Since my very first beginning with CI I have not been very pleased with CI's handling of database errors. If I execute a mis-typed query, CI goes directly to an error page instead of providing me mechanisms to take the proper actions. Although this is configurable, I still don't have methods to know whether the Database Class methods succeeds. Think of insert(), update() or delete() methods, I think they should return TRUE or FALSE whenever they succeed or fail to do their jobs. Instead I must invoke database-specific functions to guess it.

I wonder if there is any other way to achieve this effect without having to overload all this methods at all.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.