Hello! Now designing your framework. Previously written on yii2. Decided to implement exception handling in the core of the framework. Read this https://habrahabr.ru/post/30399/
and a few articles about exception handling. In practice, began to write exception classes and throw them in your code. Meanwhile when you install xdebug, we can see a nice call stack in the plate with the bug, the path to the file and line where the error occurred. When I throw custom exceptions, there is little that I need to write to write a catch block to handle it (otherwise thrown away and another error about not caught the exception - Uncaught exception), and a beautiful plaque with the stack disappears and it has to create itself (reinventing the wheel). What conclusion I did: if you throw somewhere an exception (Exception or some of their own), then under it I have to write a catch block, and invent a nice conclusion to re-stack, respectively if I have 20 of my custom exception, I have to write 20 catch blocks (if my goal is to output a unique error message and stack functions, this is not rational). And if not, throw an exception, it is a mistake I still make, in a beautiful frame. I got the impression that exception handling is beneficial only when you really need to write some handler (not just output the error message and stack). Then what is the benefit of using exceptions in the framework, what are Your thoughts?
Please do not prideratsya the words and point out errors in my reasoning, if they are, thank you.