D
D
Dmitry Khaperets2013-11-25 00:19:23
PHP
Dmitry Khaperets, 2013-11-25 00:19:23

How in php would it be possible to handle errors of any kind as an exception?

Is it possible to make it so that in php it would be possible to handle any type of error as an exception?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
C
CrazySquirrel, 2013-11-25
@CrazySquirrel

Set your own error handler and throw any exceptions
http://us2.php.net/manual/en/function.set-error-handler.php
ps as far as I remember in 5.6 all fatals will be transferred to actions.

E
Eugene Mosyukov, 2013-11-25
@GeneMoss

For fatal errors use:
http://us1.php.net/manual/ru/function.register-shutdown-function.php

E
Eugene Mosyukov, 2013-11-25
@GeneMoss

*I will always refresh the page before answering * =)

N
neoxgeforce, 2013-11-25
@neoxgeforce

throw your own exceptions. http://us1.php.net/exceptions

Y
Yeah, 2013-11-26
@Yeah

I once wrote about it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question