How stop saving in before_save logichook

Hi All,

I have scenario if record is created by specific user and record already exists by specific field_name in system the don't save it just log in SugarCRM log or in my custom failure log module add log entry and I want to check this condition in before save hook.

Can anyone suggest please?

Kindest Regards,

Shreya