exception handling for the scriptjob