Opened 14 years ago
Closed 13 years ago
#542 closed defect (fixed)
Missing exception docs on Database::get_document()
Reported by: | Mikkel Kamstrup Erlandsen | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | 1.2.6 |
Component: | Documentation | Version: | |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | All |
Description
The docs for Database::get_document() states that it can only throw Xapian::DocNotFoundError but fact is that it will also throw Xapian::InvalidArgumentError if docid==0. See fx. api/omdatabase.cc line 442.
Attachments (2)
Change History (4)
by , 14 years ago
Attachment: | InvalidArgumentError.patch added |
---|
comment:1 by , 14 years ago
Milestone: | → 1.2.6 |
---|
I don't think we want to deprecate this, rather document with an @exception in the doxygen comment for get_document() in include/xapian/database.h.
Sadly the @exception markers are currently rather incomplete (and possibly incorrect in indicating exceptions which never actually get thrown).
We should at least fix this case for 1.2.6, so setting milestone.
by , 14 years ago
Attachment: | @exceptionAdditionInDatabase.h.patch added |
---|
I have added exception for that....but there are lot of @exception still to be added
comment:2 by , 13 years ago
Component: | Other → Documentation |
---|---|
Resolution: | → fixed |
Status: | new → closed |
laserbled: your patch adds @exception for Database::positionlist_end(), which doesn't actually throw any exceptions (see the inline definition return PositionIterator(NULL)
). The reporter said Database::get_document().
Added missed @exception for that in r15506.
We've already got an entry about the more general issue in the MissingDocumentation list.
I assume this is what the ticket was about.