diff --git a/_posts/08-03-01-Exceptions.md b/_posts/08-03-01-Exceptions.md index 13b3a8d..b5679a1 100644 --- a/_posts/08-03-01-Exceptions.md +++ b/_posts/08-03-01-Exceptions.md @@ -16,8 +16,8 @@ looking for a mistake and check the docs to see what the error method is for thi obvious. Another problem is when classes automatically throw an error to the screen and exit the process. When you do this you -stop another developer from being able to dynamically handle that error. Exceptions should be thrown to make a developer aware -of an error; they then can choose how to handle this. E.g.: +stop another developer from being able to dynamically handle that error. Exceptions should be thrown to make a developer +aware of an error; they then can choose how to handle this. E.g.: {% highlight php %} lot of custom Exceptions, some of which could have be provided in the [SPL extension][splext]. If for example you use the `__call()` Magic Method and an invalid method is requested then instead of throwing a standard -Exception which is vague, or creating a custom Exception just for that, you could just `throw new BadFunctionCallException;`. +Exception which is vague, or creating a custom Exception just for that, you could just `throw new BadMethodCallException;`. * [Read about Exceptions][exceptions] * [Read about SPL Exceptions][splexe]