Error Range
Posted in 1999
Topics: Error Codes & Troubleshooting, Platform-Specific Issues
<HTML> I'm using Online 7.21 under Solaris. <P>Witch range of error codes can I use for my own defined errors ? <P>Thanks.</HTML>
Carlos Novo Negrillo wrote: > > I'm using Online 7.21 under Solaris. > > Witch range of error codes can I use for my own defined errors ? The answer depends on what other products you are using besides online and how you want to generate these errors. For example if from a stored procedure there is one specific USER ERROR value you are explicitely guaranteed is usable. Beyond that see the ERROR MESSAGES manual which should be online at the Informix WEB Site with the rest of the docs. General: Errors > 0 there are only a few dozen that Informix uses and mostly these are generated from tools. However numbers from 101->1200 are safe. For negative numbers here is a partial of ranges various Informix products use, the full list can be derived from the manual: Range Product ------------ ---------------------------------- -1 => -99 All (Indicate OS errors usually the ABS of the error) -100 => -199 ISAM Errors returned from the engine. -200 => -999 SQL Errors returned from the engine. -1003 => -1171 Form and Menu errors from PERFORM. -1200 => -1278 Conversion errors all development tools (manual says 4GL Runtime but ESQL/C will return these also). -1301 => -1396 4GL Runtime Errors. -1800 => -1812 Connection errors, all development tools. -2013 => -2999 Form compiler errors. -3000 => -3999 PERFORM errors. That covers about the first half of the Error Messages manual, and there are several other ranges covering values down to -50999, but that ought to give you a few ranges of values you can safely use. It is safest to use a range that Informix has already defined for a product that you will never use or where there will be no confusion. For example if you do not use PERFORM or are writing an ESQL/C program you could reuse PERFORM runtime errors. Art S. Kagel