To throw an exception we need to include a CustomException class.
include_once("CustomException.class.php");
Ok.
On another file, when we use the try/catch blocks, do we need to require or include, our CustomException class again?
Thanks in advance,
MEM
If the exception of this class was thrown, it has already been included at this point of the script. And if it’s not thrown nothing bad happens. The typehint will not raise any errors if there’s no such exception defined. Try running this code: