Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Documenting Errors in your code
Hi, which is the correct way AND EFFICIENT way to document errors?
When you have a software like SAP, a software you sell to lot of people you can take 1 years to program a module. When you have a software you could sell to about 20 customer maximum, you can't take that time.
Going to efficience, to create a error number for every single error you could have, hadn't been practical for us. Because the complexity of the software, and different modules, there are very distinct error messages.
The best way and mora practical way to raise errors had been this:
cErrorMessage := 'Error message';
SELECT ... into ... from .. where; -- so if select fails the error
will go to the end
IF condition THEN -- if there is an error condiction, message and go to the end
cErrorMessage := 'Error message';
raise ERROR;
END IF;
RETURN 'T' -- NO ERROR
EXCEPTIN
return cErrorMessage ||sqlerrm; -- RETURN THE ERROR
END;
If found other ways
to assign a number 2034 = error type 1
to create variable in a package and raise using this nErroTyp1=2034
Which is the best way to document errors in your experience?, thanks.
--
Oracle Certified Profesional 9i 10g
Orace Certified Professional Developer 6i
8 years of experience in Oracle 7,8i,9i,10g and developer 6i
--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jul 25 2005 - 09:06:56 CDT