I don't seem to be able to grasp this properly.
By using exceptions and try catch blocks you can nicely grab all your errors and do anything that you want.
But why?
Errors aren't supposed to be happening in the first place, so why would you code your way around it? There's no point in covering them up using catch blocks right?
Instead I think a coder should make sure that the error cannot and does not happen, to maintain application integrity.
I can't grasp the advantage, even though I really want to. But how does an exception handler give you a better way to handle issues then just debugging your code properly?
Using die() or trigger_error() generally gives enough flexibility to show what shouldn't have been happening, so it can't be fixed. Why code an exception handler around that?
Note that I'm not trying to flame exception lovers or anything but I think I'm missing an important area here -- the area that shows the actual advantage, which makes me use exceptions.
Well any input is appreciated
Thanks