Hi,
I’m trying to raise an error to a Background Job.
I have a procedure that is called by a background job.
I’ll fetch an object, and sometime it doesn’t exist. Normally because the object is deleted by the user before the job has been run.
CURSOR get_Objid IS
select objid from project_transaction WHERE objkey = 'BB8A4E9B030B41DDABB62F8381C9DFFD';
OPEN get_Objid;
FETCH get_Objid
INTO objid_;
CLOSE get_Objid;
I would then like to handle the exception and have a custom error message send back to the background job. So I use this one:
IF (objid_ is null) THEN
raise_application_error(-20001,'No value in objid!');
END IF;
It works find when running the script in a terminal, but if I run it with a background job I don’t get the error.
How can this be done?
BR Kresten