Error handling in logic hooks, Entering inside first logic hook but not entering in 2nd logic hook

I am saving lead bean and after after save logic bean are getting executed but after 1st logic hook it is not entering in 2nd logic hook and not getting any error as well.

There is one line though in logs that is saying

Error inserting into table: aow_processed

Can this be the reason.

How can i prevent this issue, Can it be possible that suitecrm ignore this issues and go to next logic hook.

Add some logging in your first logic hook, one at the beginning, one at the end.

If you get a lot of messages from the first line, that means you are probably saving a bean (or creating a relationship) and it creates another call to the same logic hook, and infinite recursion, causing the second hook never to be reached.

If you get a single message from the first line, but not the one from the last line, then you are getting a FATAL inside your code.

But that piece of code works sometimes, sometimes dosen’t work. How to identify fatal code inside code.
Is there any way we can add error handling on logic hooks so that it will go to next logic hook even if fatal error is thrown

Please try the test I suggested. You can make your own code log stuff by adding:

$GLOBALS['log']->error('Some message);

And then keep an eye on the logs, always on both logs, not just one.