can be avoidedshould directly lead to a fixmessage is more
important than typevery important in librariesshould not be
catchedexamples: wrong argument type / value calling method in
incorrect order creating an instance of static class calling not
implemented method
can NOT be avoidedtype is more important than messageshould be
catchedoften related to thread safetyexamples: file / directory /
database entry not found duplicate entry in database
throw only exceptions from your namespaceusage error write nice
ex. message for human developerruntime error use very specific type
(often requires creating a new one) message is often uselessphpDoc
Always specify all runtime exceptions @throw annotation is part of
API
never display ex. message to the usercatch as specific types as
possibleread and respect @throw annotationsuse $previous when
rethrowing ex.