+ Start a Discussion
DebjaniDebjani 

Ways to perform batchable class analysis

Hi,
We are trying to identify possible areas of batchable class being errorring out or failing. Sometimes batch jobs may fail in one environment and in other places it may not. So it is situational , but forecasting or giving guess analysis of areas of failure based on code is possible? If, so which are those areas of code to look for or identify ?

NOTE:Any old logs are not available to check for previously occured errors

Naval Sharma4Naval Sharma4
Hi,

A batch execution takes place in execute method which is heart of the batch. So you can look into that code for debugging occurred issues. If you want to notify users then you can send an email in finish method or catch block with StackTraceString and LineNumber.

Regards,
Naval
DebjaniDebjani
@Naval,
On the similar line, can I ask for impacts that may occur when we perform operations like delete/update using batch jobs.
 
Naval Sharma4Naval Sharma4
Hi,

There is no impact which can create any issue with such operations. Batch jobs always runs in batches and if any error occurs during the execution of batch then that perticular batch will fail and rest of will be succeed.