IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 22 years ago

Closed 22 years ago

Last modified 22 years ago

#54 closed defect (fixed)

Error handling definition

Reported by: Eric.VanAlst@… Owned by: Paul Price
Priority: normal Milestone:
Component: PSLib SDRS Version: unspecified
Severity: normal Keywords:
Cc:

Description

In SDR-01 paragraph 2.3, the error handling design changed from the previous
SDR. The following is a list of clarifications needed:
1) The psError prototype shows a return of type int, but the description states
it returns an error code. Should the return value remain int or change to
psErrorCode?
2) The psError prototype shows an argument of type int named status, but the
description identifies an argument of type boolean named new. Later in the
description a reference is made to a psError argument of type boolean named
psErrorStatus. The prototype or the description of psError needs to be changed
to describe the desired functionality of psError.
3) In paragraph 2.3.1.1, function psErrorRegisterSet is specified as a private
function, but the naming convention is public. The description refers to any
project using PSLib needs to register error codes. This statement implies a
public function is necessary. Is psErrorRegisterSet public or private? In the
same description, a function named psErrorRegister is defined to be only used
for PSLib internal errors. Is there a need to have a dedicated function for
registering internal error codes for PSLib?
4) In paragraph 2.3.1.1, the description states that calling an error code
registeration function shall be a part of program initialization. Is this
statement implying that there needs to be a function(i.e. psLibInit() ) that
needs to be invoked before the user can utilize psLib functions?

Change History (8)

comment:1 by eugene, 22 years ago

Resolution: fixed
Status: newclosed

1) int -> psErrorCode (changed in SDRS)
2) status (or new?) should be a boolean with value of TRUE/FALSE. But, do we
have an explicit boolean type? do we have TRUE/FALSE defined anywhere? If not,
we should make sure it happens...
3) psErrorRegisterSet should be public. It does seem that we need a single
function (psErrorRegisterInternal?) which would call psErrorRegisterSet with a
pre-defined collection of PSLib internal errors. Or, perhaps this should be
part of a PSLib initialization function yet-to-be defined. (Are there other
initializations which must take place that can't be done statically?)
4) see also (3)

comment:2 by Paul Price, 22 years ago

Updated SDRS to read:

psErrorCode psError(const char *name, psErrorCode code, bool new, const char
*fmt, ...);

comment:3 by eugene, 22 years ago

to close this out, let's define a psLib initialization function: psLibInit ()
which for now is generated on build from the file psErrorCodes.dat and which
calls the function psErrorRegisterSet for the listed error codes as described in
2.3.1.2. Any program which uses psLib must call psLibInit () early on.

comment:4 by Eric.VanAlst@…, 22 years ago

Resolution: fixed
Status: closedreopened

The resolution specifies a function psLibInit but this function is not present
in SDR-06.

comment:5 by eugene, 22 years ago

Owner: changed from eugene to Paul Price
Status: reopenednew

comment:6 by Paul Price, 22 years ago

Resolution: fixed
Status: newclosed

Added void psLibInit(void) to the SDRS.

comment:7 by Paul Price, 22 years ago

Keywords: VERIFIED added

Should be fixed in SDRS-07 and ADD-06 (7 September 2004).

comment:8 by Paul Price, 22 years ago

Keywords: VERIFIED removed
Note: See TracTickets for help on using tickets.