Welcome Guest, Not a member yet? Register   Sign In
How to print the custom error message on DB errors?
#1

[eluser]Unknown[/eluser]
Hi,

I'm using CI 1.7.3 and developing a program which only respond to the client as XML. Users access this service through their client program on the mobile device.

CI prints a pretty formed HTML error message to the client on DB connection or query errors. However, it is useless to me and I want to print a custom XML(represent an error) message without CI default error message.

Is there a way to do this like an error callback handler?

Thank you.

-Brian
#2

[eluser]umefarooq[/eluser]
yes you can show errors show_error() will help you please read user guide

http://ellislab.com/codeigniter/user-gui...rrors.html
#3

[eluser]Unknown[/eluser]
[quote author="umefarooq" date="1297089158"]yes you can show errors show_error() will help you please read user guide

http://ellislab.com/codeigniter/user-gui...rrors.html[/quote]

Thank you for your reply. However, CI shows its own error message immediately when an error condition is occurred in the active record DB. So, I cannot prevent CI default error message through show_error() function.




Theme © iAndrew 2016 - Forum software by © MyBB