I am modifying some code and I have an error handler set up as follows:
function handle_exception($exception)
{
echo "<p><strong>Problem: </strong>{$exception->getMessage()}\n</p>";
}
My login form takes a potential user to my welcome page where the login functions are processed. I am trying to test the portion where the login fails because the username and password did not match a combination in my database. The message is set and triggered as follows:
else
{$errmsg = "Login Failed: the username/password combination failed!";
throw new Exception($errmsg);
}
This is in the middle of my page so when it triggers the rest of my page never gets generated so text is lost and never displays and tags are left open for some divs, body, etc. :eek:
Is there a way to have it return to a place in the document and process from there down so that the document renders fully with the error message in the middle of the page?