I need to show syntax errors and unexpected exceptions in my custom module admin grid. Which method is suitable for this in Magento 2.
EDIT
Instead of save into exception.log file, I need to save to db, and show in admin grid.
When I'm developing with Magento 2 I usually edit app/bootstrap.php and enable the line:
ini_set('display_errors', 1);
Hope it helps
Please check the below link with an answer.
Custom Exceptions for module for Magento 2
I hope it helps!