PHP - Error and Exception Handling
You want to throw a custom exception
MyException with a message and code. Which code correctly throws it?MyException with a message and code. Which code correctly throws it?new and can accept message and code parameters.MyException with message and code. throw MyException("Failed", 404); misses new. throw new Exception("Failed", 404); throws base Exception, not custom. throw new MyException(); misses parameters.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions