/    Sign up×
Community /Pin to ProfileBookmark

Adjusting What Errors Do

I’m launching a new site and until things get smoothed out, it would be nice to know everytime an error is thrown.

Is there a way that I could get the system to email me anytime an error or warning comes up? And instead of it giving something ugly to the user, It could just say some message I choose like ‘There has been a problem, and we’re aware of it. Please check back in 30 minutes’ — or something like that?

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@balloonbuffoonJan 07.2006 — Check out this function:

[URL=http://us2.php.net/manual/en/function.set-error-handler.php]set_error_handler()[/URL]

It will call a custom function instead of spitting out the normal error. In your own function you can email yourself and echo a friendly error warning.

--Steve
×

Success!

Help @jeditdog spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...