#157 closed defect (fixed)
psMetadata{Next,Prev}()/psMetadataLookup() shouldn't call psError()
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | sys | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I don't think that we want psMetadata{Next,Prev}()/psMetadataLookup() to push an error onto the
errorstack.
They are often used to iterate over all metadata items (psMetadata{Prev,Next}()) and a NULL is the
_expected_ termination of the loop.
it isn't quite so clear for psMetadataLookup(), but it's used to check if a desired keyword is present,
so the extra error message isn't really desired. We could work around this by allowing a user to set
a mark in the error stack and pop back to it, but do we need to go to these lengths? (and the error
will still have been logged)
Change History (2)
comment:1 by , 22 years ago
| Owner: | changed from to |
|---|
comment:2 by , 22 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Yes, good point! Fix is in CVS trunk.
I removed the psError calls in the most nominal case for
psMetadataGet{Next,Prev} where the metadata item end is reached. Errorneous
parameters will still produce an error.
For psMetadataLookup, I made the case where the desired keyword is not present
to not call psError. Again, errors in parameters (e.g., a NULL metadata or key
parameter) still produce an error.
-rdd