Welcome Guest, Not a member yet? Register   Sign In
Graceful error messages
#1

[eluser]stevefink[/eluser]
Folks,

Is there anyway I can do something to eliminate hard errors such as these for my application?


An Error Was Encountered

Error Number: 1062

Duplicate entry '123413421' for key 2

INSERT INTO vehicles (vin, stock, type, year, price, mileage, transmission, ext_color, int_color, body_style, doors, drive_train, engine, wheel_base, load_rating, notes, additional_opts, model_id, trim_id) VALUES ('123413421', '1234567', 'New', '2009', '', '', '', '', '', 0, 'null', 'null', '', '', '', '', '', '4', '18')


I'd much rather display something more user friendly to the non-tech type. I do realize I have to add sanity checking for duplies entries in my actual PHP, but where I miss these types of checks, what's my best bet?

- sf
#2

[eluser]mmm_broccoli[/eluser]
just disable error reporting, and during your normal error checking code you can output your own messages




Theme © iAndrew 2016 - Forum software by © MyBB