Catch and write errors to a log file in Magento
Learn how to catch exceptions and record errors in log files instead of displaying them to users.
Lesson Content
It’s possible that our repository call can still fail, so let’s wrap this within a try...catch statement. We’ll catch a regular Exception. Since we don’t want errors displayed to the screen on pro...
Join the discussion!
Comments
Want to comment on this lesson?
Enroll in this course to leave comments.