Skip to main content
Topic: Custom error message if duplicate foreign key constraints aren't respected (Read 1015 times) previous topic - next topic

Custom error message if duplicate foreign key constraints aren't respected

So for my college project, I decided to give PHPRad a try and I did manage to create my application but if I make an insert into a database with input that doesn't respect foreign key constraints I'll get only a PDO exception. Is there a possible solution to this problem? Ty in advance!

Re: Custom error message if duplicate foreign key constraints aren't respected

Reply #1
Sorry the only solution now is to edit code manually and provide custom message on the if query error condition.
or
Better approach will be to publish your application in Production mode in PHPRad (under publish settings). That will make the errors not to display but log on the "error.log" file.

Best regards

 

Re: Custom error message if duplicate foreign key constraints aren't respected

Reply #2
I'm sorry for asking but I can't find "publish settings" can you help me out with it?
I'm using classic 2.3