EXITCODE/ERRORCODE lazarus / 61-Beginners ---------------------------------------------------------------------- Andy Anderson · 2014-09-05 16:24 I want to do something like: TRY ------(some code)------- Finally WRITELN (EXITCODE)  //or ERRORCODE end; How do I access the EXIT/ERRORCODE ? What declarations (units) are needed ? Thanks in advance. ---------------------------------------------------------------------- Mike.Cornflake · 2014-09-05 16:30 Errr...   I'm not fully misunderstanding your question...  Depends what your code in ------(some code)------- is calling I guess. ---------------------------------------------------------------------- Rails · 2014-09-05 17:21 http://www.freepascal.org/docs-html/ref/refch17.html#x211-22100017 contains information on exception handling, including error codes. This should give you some place to start.