OS-ERROR function
Returns, as an INTEGER value, an ABL error code that indicates whether an execution error occurred during the last OS-APPEND, OS-COPY, OS-CREATE-DIR, OS-DELETE, OS-RENAME or SAVE CACHE statement.
Syntax
ExampleThe following procedure prompts the user to enter a file to delete, attempts to delete the file, and then calls the OS-ERROR function to check for an execution error. If an error occurs, the procedure branches based on the error number and responds accordingly.
Notes
- This function returns 0 if no error occurred.
- Use this function immediately following an OS-APPEND, OS-COPY, OS-CREATE-DIR, OS-DELETE, OS-RENAME, or SAVE CACHE statement to determine whether an error occurred during the statement’s execution. If you do not, the next use of one of these statements overwrites the previous error code.
- Table 48 lists the ABL error codes that the OS-ERROR function can return.
See alsoOS-APPEND statement, OS-COPY statement, OS-CREATE-DIR statement, OS-DELETE statement, OS-RENAME statement, SAVE CACHE statement
OpenEdge Release 10.2B
|