The Little Guy Posted August 8, 2008 Share Posted August 8, 2008 I am making this script I am/may distribute, and would like to know how to throw custom error messages. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted August 8, 2008 Share Posted August 8, 2008 trigger_error() or exceptions. Quote Link to comment Share on other sites More sharing options...
NathanLedet Posted August 8, 2008 Share Posted August 8, 2008 based on what? based on MySQL errors? input validation errors? Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted August 8, 2008 Author Share Posted August 8, 2008 based on what? based on MySQL errors? input validation errors? Input Validation errors Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted August 8, 2008 Author Share Posted August 8, 2008 trigger_error() or exceptions. That works, only it shows the line the error was thrown, and not the line where the error occurred. so if I have a class myClass with a method myMethod and I call it like so: echo $classInstance->myMethod(23); say the number 23 passed to it is supposed to be a float number, well the above is not a float so it will throw an error. The problem is that it is throwing the error in the class file, and not the file where I echo out the class. Make sense? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.