Go to the previous, next section.
#include <nihcl/nihclerrs.h>
Error codes and their associated error messages are defined in the file
`nihclerrs.err'. The
errgen
utility reads this file and generates the file
`nihclerrs.h', which defines a preprocessor symbol beginning with
"NIHCL__"
for each error code, and the file
`nihclerrs.c', which defines a table containing the corresponding error messages.
While modules may use the
NIHCL__
symbols as the first argument to
NIHCL::setError()
, doing so requires including
`nihclerrs.h', which causes the module to be recompiled each time a new error code is added to the library. To eliminate this dependency, a corresponding external symbol beginning with
"NIHCL_"
is also defined for each error code, and it is these external symbols that modules typically use when calling
NIHCL::setError()
.
Each error message begins with the error code enclosed in
[]
s. The name of the corresponding preprocessor symbol for the error is obtained by prepending
"NIHCL__"
, and the name of the corresponding external symbol for the error is obtained by prepending
"NIHCL_"
. For example, the error message
[ALLOCFAIL] Not enough memory -- NEW failed
has the corresponding preprocessor symbol
NIHCL__ALLOCFAIL
and the external symbol
NIHCL_ALLOCFAIL
.
An error message may also include variable fields, which are filled in from arguments passed to
NIHCL::setError()
at the error site.
The following section describes each NIH Class Library error message in detail.
[ALLOCFAIL] Not enough memory -- NEW failed
new
failed to allocate the requested amount of memory.
[ALLOCSIZE] Negative or zero object allocation size requested:
this->classname()
[AMBIGCASTDN] Ambiguous downward cast:
this->fromclass::_castdown(toclass)
[ASTBLK] AST tried to block on semaphore:
this->classname::fname()
Semaphore
at address
this
during the execution of an asynchronous system trap or signal handler.
[BADARGCL] Invalid argument class: expected
fname(expect), was
fname(got)
@item{ [BADARGCLM] Invalid argument class: expected classname::fname(expect),} @itemx{was classname::fname(got)} Member function classname::fname expected an argument of class expect, but was called with an argument of class got instead.
[BADARGSP] Invalid argument species: expected
fname(expect), was
fname(got)
@item{[BADARGSPM] Invalid argument species: expected classname::fname(expect),} @itemx{was classname::fname(got)} Member function classname::fname expected an argument of species expect, but was called with an argument of species got instead.
[BADCASTDN] Invalid downward cast:
this->fromclass::_safe_castdown(toclass)
[BADCLASS] Invalid object class: expected
expect, was
got
[BADDAY] Invalid day of week:
weekdaynumber
[BADDAYNAM] Invalid day of week name:
weekdayname
[BADERRNUM] Invalid error code:
fname(errorcode)
[BADMODAY] Invalid day of month:
this->Date::Date(day,month,year)
Date
at address
this
with an invalid day of the month; that is,
day
is not a valid day of the month
month
in the year
year.
[BADMONAM] Invalid month name:
monthname
[BADMONTH] Invalid month:
monthnumber
[BADPRI] Requested process priority (newpri) exceeds maximum (maxpri)
[BADRANGE] Invalid or undefined Range:
this->classname::fname([first:len])
Range
that is invalid (len
< 0) or out of bounds.
[BADREGEX]
errmsg:
this->Regex::Regex("regex")
Regex
at address
this, but the regular expression
regex
is illegal. The message
errmsg
explains why.
[BADSPEC] Invalid object species: expected
expect, was
got
[BADSTMBR]
this->classname::storeMemberOn() not called from Object::storeOn()
storeMemberOn()
was applied to the instance of class
classname
at address
this, but a
storeOn()
operation was not in progress.
[BADTIME] Invalid date/time:
day-mon-yr
hour:min:sec
dst
[BADTRACETBL] Invalid trace table at
traceadr:
this->classname::create()
create()
function found a trace table with a bad
code
field, so it couldn't determine which register was being used as the frame pointer. This error only occurs on the IBM RT.
[CLTNEMPTY] Collection empty:
this->classname::fname()
@item{[CPSEMWAIT] Attempt to copy semaphore with
num
waiting process(es):} @itemx{this->classname::deepCopy()} An attempt to
deepCopy()
the instance of class
classname
at address
this
failed because the instance is a
Semaphore
with
num
processes waiting on it. A
Semaphore
may only be copied if no processes are waiting on it.
[DATERANGE] Date
day-mon-yr
out of range for conversion to Time
Date
day-mon-yr
could not be converted to an instance of class
Time
because it is before January 1, 1901 GMT or after December 31, 2036 GMT.
@item{[DBLLNK] Attempt to add
linkclass
to two
listclasss:} @itemx{this->listclass::fname((linkclass*)linkadr)} An attempt was made to place the instance of class
linkclass
(a derived class of
Link
) at address
linkadr
on the instance of class
listclass
(a
LinkedList
or derived class) at address
this
with the function
fname, but the instance of class
linkclass
is already on another
LinkedList
, as indicated by its non-zero
next
pointer.
[DELLNK] Attempt to delete
classname
with non-NULL next (=next):
this->~Link()
Link
) at address
this, but it is still on a
LinkedList
, as indicated by its non-zero
next
pointer, which is pointing to
next.
@item{[DLSEMWAIT] Attempt to delete semaphore with
num
waiting process(es):} @itemx{this->~classname()} An attempt was made to delete the instance of class
classname
(a
Semaphore
or derived class) at address
this, but there are still
num
processes waiting on it.
[DRVDCLASSRSP] Unimplemented function
this->classname::fname()
[DUPKEY] Tried to add duplicate key:
this->classname::fname((keyclass*)keyadr)
Dictionary
or derived class) at address
this
by applying the function
fname, but a key object with an equal value is already in the
Dictionary
.
[FCTNOV] Fraction overflow:
this->Fraction::Fraction(x)
Fraction
.
[FCTNUN] Fraction underflow:
this->Fraction::Fraction(x)
Fraction
.
[ILLEGALMFCN] Illegal function
this->classname::fname()
::
fname
()
was applied to the instance of
classname
at address
this, but
fname
()
is defined as
shouldNotImplement()
.
[INDEXRANGE] Index out of range:
this->classname::operator[]()
[INVALIDPS] Invalid process
procname
state:
this->classname.state=state
SUSPENDED =0
,
RUNNING =1
, or
TERMINATED =2
.
[KEYNOTFOUND] Key not found:
this->classname::atKey((keyclass*)keyadr)
Dictionary
or derived class) at address
this, but a key object with an equal value could not be found.
@item{[MISSINGLNK]
afterclass
not on list:
this->classname::addAfter((afterclass*)afteradr,} @itemx{(linkclass*)linkadr)} The function
addAfter()
was applied to the instance of class
classname
(a
LinkedList
or derived class) at address
this
to add the instance of class
linkclass
(a derived class of
Link
) at address
linkadr
after the instance of class
afterclass
at address
afteradr, but this instance is not on the
LinkedList
either because the
afterclass
has a zero
next
pointer, or because the
LinkedList
is empty.
[NYET] Sorry,
classname::fname is not implemented yet
()
has not been implemented yet.
[OBNOTFOUND] Object not found:
this->classname::fname((obclass*)obadr)
[RDABSTCLASS] Tried to read object of abstract class
classname
::reader()
was called to read an instance of an abstract class, which is illegal since an instance of an abstract class cannot be stored.@item{[RDBADSIG] Incorrect class classname signature encountered on read:} @itemx{expected expect, was got} The version of class classname that is linked with the program has signature expect, but the program attempted to read an instance of class classname stored by an incompatible version of that class with signature got.
[RDBADTYP] Bad record type (code) read from file descriptor
fdesc
storeOnClassRef =0
,
storeOnClass =1
, or
storeOnObjectRef =2
was read from the file descriptor
fdesc.
[RDEOF] Premature EOF encountered on input stream
readFrom()
operation.
[RDFAIL] Input stream read failed ...
context
...
readFrom()
operation. The string
context
shows the 30 characters following the point at which the read failed.
[RDSYNERR] Syntax error on input stream: expected
expect, was
got
...
readFrom()
operation. The string
expect
was expected, but the string
got
was actually read.
[RDUNKCLASS] Tried to read object of unknown class
classname
[RDWRONGCLASS] Tried to read object of wrong class: expected
expect, was
got
readFrom()
function expected to read an instance of class
expect, or a derived class of
expect, but found an instance of class
got
instead.
[READBINERR]
errmsg
readFrom()
operation. The message
errmsg
explains why.
[READBINUNDFL] Underflow --
expect
bytes expected -
got
bytes read
readFrom()
operation tried to read
expect
bytes, but got only
got.
@item{[REMOVEERR] Tried to remove object not in collection:} @itemx{this->classname::remove((obclass*)obadr)} An attempt was made to remove the instance of class
obclass
at address
obadr
from the instance of the
Collection
class
classname
at address
this, but the instance is not in this collection.
[RESRUN] Attempt to resume RUNNING process
name
(this)
[RESTERM] Attempt to resume TERMINATED process
name
(this)
[SLICERANGE] Vector slice out of range:
this->classname[length](pos,lgt,stride)
[STACKOV] Process
name
stack overflow
StackProc
, was not large enough to accommodate the maximum call nesting depth of the process.@item{[STMBRREF] Attempt to store member variable object with reference} @itemx{@objnum:objnum->classname::storeOn()} An attempt was made to store the member variable object of class classname at address objadr, but this object has already been stored as object number objnum, so it cannot also be stored as a member of another object.
[STOREBINERR]
errmsg
storeOn()
operation. The message
errmsg
explains why.@item{[STREFMBR] Attempt to store reference to member variable object:} @itemx{this->classname::storeOn()} An attempt was made to store the object of class classname at address this, but this object is a member variable of another object that has already been stored.
[STROV] String buffer overflowed during read of string
str
(n
characters)
readFrom()
operation because its length (n) exceeds the length of the buffer supplied.
@item{[STSEMWAIT] Attempt to store semaphore with
num
waiting process(es):} @itemx{this->classname::storeOn()} An attempt was made to store the instance of class
classname
(a
Semaphore
or derived class) at address
this, but there are
num
processes waiting on it.
@item{[SUBSTRERR] SubString position/length out of range:} @itemx{this->classname::operator()(pos,len)} An attempt was made to extract or replace a
SubString
that extends beyond the end of the instance of class
classname
(a
String
or derived class) at address
this.
[SUSTERM] Attempt to suspend TERMINATED process
name
(this)
[VECTOREMPTY] Illegal operation on zero-length
classname:
fname(this)
Vector
) at address
this, but could not be performed because the vector was of length zero.
[VECTORLENGTH] Unequal lengths:
uadr->uclass[ulen] and
vadr->vclass[vlen]
@item{[VECTORSELECT] Unequal lengths:
this->classname[veclen] and
n
ones in} @itemx{bitvecadr->BitVec[bitveclen]} The length of the instance of class
classname
(a derived class of
Vector
) at address
this
does not equal
n, the number of ones in the
BitVec
of length
bitveclen
at address
bitvecadr.
@item{[ZERODEN] Attempt to construct Fraction with zero denominator:} @itemx{this->Fraction::Fraction(num,den)} At attempt was made to construct an instance of class
Fraction
at address
this
with a numerator of
num
and a denominator of zero.
Go to the previous, next section.