You need to sign in to do that
Don't have an account?
Best practice for notifying exception in future method or batch job
Hi,
If the exception happens in UI controller or trigger, the exception can be caught, and then be presented to UI through VF apex:message. I wonder what's Best practice for notifying exception in future method or batch job where there's no UI interface directly to user. I can only think of 2 options, 1) catch the exeption, and put either the raw error message or user-friendly error message into debug log, 2) catch the exception, and throw an new exception with a user-friendly error message; and this exception will be logged into apex job execution result by SFDC.
Any other thoughts?
Option 1
Option 2 - same as option 1 plus