PowerAda Return Codes for Commands

From OC Systems Wiki!
< PowerAda:APPENDIX E. Tools Reference
Revision as of 10:39, 24 April 2019 by imported>WikiVisor
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


The compiler and the other tools in this reference are useful for building shell scripts. They have a consistent set of return codes to make it easier to create shell scripts that call them and deal with any problems that occur. The following are the return codes set by the Ada tools.

0

Normal completion code. The command completed successfully. This code includes the case when the -h option is used to select help.

1

There was a command syntax error. The possible reasons include:

  • Required options are missing.
  • Required parameters for options are missing.
  • Options are not recognized.
  • Mutually exclusive options specified.
  • Unit names are not valid.
2

A file or directory was specified incorrectly. The possible reasons include:

  • The file or directory name does not follow system file naming conventions.
  • The file or directory does not exist.
  • The file or directory does not have the necessary permissions.
3

A sublibrary was specified incorrectly. The possible reasons include:

  • The sublibrary name is incorrect.
  • The sublibrary does not exist.
  • The sublibrary does not have the necessary permissions.
  • The sublibrary is not actually an Ada sublibrary, or it is a sublibrary but its format is incorrect.
  • The sublibrary is in use.
4

A unit was specified incorrectly. The possible reasons include:

  • The unit name is not valid.
  • The unit does not exist.
  • The unit name was not qualified with lib/ or sec/when this was required.
5

A file contains multiple compilation units, or a compilation unit is one of several defined in the same file.

6

The asrcdep command determined a potentially correct compilation order, but the order cannot be verified because pragma INLINE was used.

7

Circularities were detected in the dependency information for Ada compilation units. These can be caused by true Ada circularities (such as a package specification X using with Y; when package specification Y uses with X;). Circularities can also occur when a single source file contains multiple compilation units.

8

A source file contains an incorrect set of compilation units (such as a combination of a function specification and a procedure body with the same name).

9

A compilation unit was defined more than once in a single file or in a set of files.

10

No operation was necessary so nothing was done.

11

The target already exists.

12

One or more Ada sublibraries failed a check.

13

One or more Ada source files had syntax or semantic errors.

14

Syntax errors were found in the control file of afmt.

16

A sublibrary, unit, or file was not copied or moved because it already existed in the target.

17

alibchk or alibcompress could not operate on a sublibrary because some other program had locked the sublibrary. The sublibrary may have been used in a compilation.

18

The specified sublibrary is not recognized as a sublibrary. It may be damaged or have the wrong format, or you may have specified a file or directory that was not a sublibrary.

21

A compilation unit object was missing from the archive file of a sublibrary while invoking alibchk.

22

An extraneous compilation unit object was found in the archive file of a sublibrary while invoking alibchk.

25

The areport command found nothing to report. None of the specified files, units, or sublibraries matched the selection conditions.

26

Optional compilation unit bodies are missing. For example, a package specification may not require a body, so it is uncertain if a body is intended but missing or simply not intended.

27

There are missing or obsolete compilation units.

15, 23-24, 28-97

Undefined.

98

An alibcompress operation failed and may have left the sublibrary corrupted.

99

Some other unexpected error occurred.

130

Values greater than 128 indicate that the program terminated abnormally, probably due to a signal being delivered. For example, a value of 130 (128 + 2) indicates signal 2, SIGINT was delivered, perhaps by Ctrl-C.