next up previous contents
Next: About this document ... Up: pil Previous: Notes   Contents


PIL Error Codes

Error codes (symbolic names and values) are common to both C/C++ and Fortran 90 API. Whenever text in the following table mentions C/C++ function, the same holds for its Fortran 90 equivalent.

Error Symbol Code Error Description
ISDC_OK 0 No error
PIL_OK 0 No error (alias of ISDC_OK)
PIL_NUL_PTR -3000 Null pointer passed as an argument, and function does not allow it. Can appear in many situations. For example passing NULL as a name of argument or passing NULL as a pointer to result variable causes PILGetXXX function to return this error code.
PIL_BAD_ARG -3001 Bad argument passed. This error may be returned in many situations. Usually means that data type is incorrect, i.e. calling PILGetInt("a",..) when parameter "a" is of type string. Also when check for file access mode fails (PILGetFname) this error is returned. When PIL_QUERY_OVERRIDE mode is in effect and default value of parameter is out of range or invalid this error is returned (PILGetXXX) This error may also mean internal PIL error.
PIL_NO_MEM -3002 Not enough memory. Means that PIL library was not able to allocate sufficient memory to handle request. This kind of error is very unlikely to happen, since PIL allocates very small amounts of memory. If it happens it probably means that memory is overwritten by process or machine (operating system) is not in good shape.
PIL_NO_FILE -3003 Cannot open/create file. This error may be returned by PILInit when parameter file cannot be found/created/copied/updated and by PILgetFname when testing for files existence.
PIL_ERR_FREAD -3004 Read from file failed. Means physical disk i/o error, lock problem, or network problem when parameter file resides on NFS mounted partition. This error may be returned by PILInit, PILFlushParameters, PILReloadParameters, PILClose
PIL_ERR_FWRITE -3005 Write to file failed. Means physical disk i/o error, disk full, lock problem, or network problem when parameter file resides on NFS mounted partition. This error may be returned by PILInit, PILFlushParameters, PILReloadParameters, PILClose

Error Symbol Code Error Description
PIL_EOS -3006 Unexpected end of string. This error means that given line in parameter file is badly formatted and does not contain 7 fields separated by ','. This error is handled internally by PIL library and should never be returned to user, since PIL library ignores all badly formatted lines in parameter files.
PIL_BAD_NAME -3007 Invalid name of parameter. This error means that name of parameter found in parameter file contains invalid characters (ASCII-7 only are allowed).
PIL_BAD_TYPE -3008 Invalid type of parameter in parameter file. This error means that PIL was not able to decode parameter type. Probably parameter file is badly formatted.
PIL_BAD_MODE -3009 Invalid mode of parameter in parameter file. This error means that PIL was not able to decode parameter mode. Probably parameter file is badly formatted.
PIL_BAD_LINE -3010 Invalid line in parameter file encountered. This error means that format of line in parameter file does not even resemble correct one.
PIL_NOT_IMPLEMENTED -3011 Feature not implemented. This error means that type/mode/indirection type is valid (according to IRAF/XPI standard) but PIL library does not implement this. Example of unimplemented feature is indirection of data from other parameter files.
PIL_FILE_NOT_EXIST -3012 File does not exist. Included for compatibility reasons. Version 1.0 of PIL does not return this error.
PIL_FILE_EXIST -3013 File exists. Included for compatibility reasons. Version 1.0 of PIL does not return this error.
PIL_FILE_NO_RD -3014 File is not readable. Check file access permission/ownership and mount options.
PIL_FILE_NO_WR -3015 File is not writable. Check file access permission/ownership and mount options. By default PIL requires READWRITE access to the parameter file.
PIL_LINE_BLANK -3016 Blank line encountered. Handled internally by PIL. Never returned to user.
PIL_LINE_COMMENT -3017 Comment line encountered. Handled internally by PIL. Never returned to user.
PIL_LINE_ERROR -3018 Invalid line encountered. Handled internally by PIL. Never returned to user.

Error Symbol Code Error Description
PIL_NOT_FOUND -3019 No such parameter. This error means that no parameter of given name is in parameter file.
PIL_PFILES_TOO_LONG -3020 PFILES environment variable too long. Included for compatibility reasons. Version 1.0 of PIL does not return this error.
PIL_PFILES_FORMAT -3021 PFILES environment variable is badly formatted. Included for compatibility reasons. Version 1.0 of PIL does not return this error.
PIL_LOCK_FAILED -3022 Cannot (un)lock parameter file. This error means that PIL library couldn't obtain exclusive access to file (by locking it). Operation still was performed, by consistency of data od disk is not assured.
PIL_BOGUS_CMDLINE -3023 Bogus parameters found in command line. In other words some of parameter names specified in command line do not have their counterparts in parameter file. This error may be returned by PILVerifyCmdLine().
PIL_NO_LOGGER -3024 Error code used internally by PIL to signal that no logger function has been registered.
PIL_LINE_TOO_MANY -3025 Format error in parameter file. Too many (>7) comma separated items found.
PIL_LINE_TOO_FEW -3026 Format error in parameter file. Too few (<7) comma separated items found.
PIL_LINE_UNMATCHED_QUOTE -3027 Format error in parameter file. Unbalanced quote or doublequote character found.
PIL_LINE_NO_LF -3028 Format error in parameter file. No terminating LineFeed character found.
PIL_LINE_EXTRA_SPACES -3029 Format error in parameter file. Extra spaces following closing quote or doublequote character found. found.
PIL_BAD_VAL_BOOL -3030 Cannot convert string to boolean value. Expecting either yes or no string.
PIL_BAD_VAL_INT -3031 Cannot convert string to integer value. Expecting [+-]dddddd format
PIL_BAD_VAL_REAL -3032 Cannot convert string to real value. Expecting [+-]ddd[.ddd][e[+-ddd]] format
PIL_BAD_VAL_INT_VAR_VECTOR -3033 Cannot convert string to a vector of integers. Expecting space separated list of integer numbers.

PIL_BAD_VAL_INT_VECTOR -3034 Cannot convert string to a vector of integers. Expecting space separated list of integer numbers. This error is also returned when number of integers found in the string does not correspond to the number given in a call to PILGetIntVector();
PIL_BAD_VAL_REAL_VAR_VECTOR -3035 Cannot convert string to a vector of reals. Expecting space separated list of real numbers.
PIL_BAD_VAL_REAL_VECTOR -3036 Cannot convert string to a vector of reals. Expecting space separated list of real numbers. This error is also returned when number of reals found in the string does not correspond to the number given in a call to PILGetRealVector() or PILGetReal4Vector().
PIL_OFF_RANGE -3037 Value is off limits set by min and max fields. This error may be returned when PIL_QUERY_OVERRIDE mode is in effect.
PIL_BAD_ENUM_VALUE -3038 Value does not match any value from enumerated list (min field). This error may be returned when PIL_QUERY_OVERRIDE mode is in effect.
PIL_BAD_FILE_ACCESS -3039 Effective file access mode does not match the one specified in parameter type (i.e. file is not readable when type is "fr"). This error may be returned when PIL_QUERY_OVERRIDE mode is in effect.


next up previous contents
Next: About this document ... Up: pil Previous: Notes   Contents
Bryan Irby 2004-10-05