Error Handling
摘要
Software is metastable. Things often break in computer applications, and with the frequent breakages come regular occurrences of errors. Exceptions, perhaps the artifact most synonymous with representing errors in PHP, tend to break rules and, thus, function chains, when thrown, for they do not propagate any meaningful values outside of the metadata encapsulated in them. They can, in PHP, however, be worked into chainable functions or avoided altogether and replaced with artifacts that simultaneously retain error information and propagate any other descriptive high-resolution data. This chapter of the book is structured so as to provide explanations of various methods for gently and efficiently representing errors while ensuring that the function chains that might be affected by their occurrence do not break completely when they are encountered.