Jump to content

Recommended Posts

So, I have been trying to keep track of all my error messages for the login, and register functions.

 

I thought about using a switch statement.

something along the lines of

 

switch(ERROR_MSG)
{case err1:
$error = "some error!";
break;

case err2:
$error = "another error!";
break;

etc etc etc....................................

}
echo $error;

 

 

Somehow that doesn't feel very practical.

 

Can anyone recommend a method for managing my error messages?

 

Thanks,

Link to comment
https://forums.phpfreaks.com/topic/196680-custom-error-management/
Share on other sites

There are a few ways you can do this however how do you want to keep track of these errors? Do they go into a file? multiple files? Please be more specific

 

 

Sorry, I posted that one in a rush.

 

I was thinking of keeping the errors in a separate file, that I could throw into an array, and then use a switch to pull the right error from the array and display it on the default master page.

 

I want to keep my application as "pretty" as I can so that no errors on plain white screens will happen.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.