Question

I am working on a project in PHP that does a lot of input validation and can throw different custom exception classes in various layers of the application. To make the project code easier to read, I've displaced all the validation code into static methods of a validation class, which performs the check and throws the appropriate exception if necessary. My problem is, the exception stacktrace displays the entire call stack down into the validation class, but I feel like the extra information is not helpful and will only serve to confuse someone trying to debug the location of the real problem. Should I simply rely on informative exception messages or is it possible to trim the trace log in some way.

No correct solution

Licensed under: CC-BY-SA with attribution
scroll top