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)

InvalidArgumentError.patch (1.2 KB ) - added by laserbled 14 years ago.
I assume this is what the ticket was about.
@exceptionAdditionInDatabase.h.patch (876 bytes ) - added by laserbled 14 years ago.
I have added exception for that....but there are lot of @exception still to be added

Download all attachments as: .zip

Change History (4)

by laserbled, 14 years ago

Attachment: InvalidArgumentError.patch added

I assume this is what the ticket was about.

comment:1 by Olly Betts, 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 laserbled, 14 years ago

I have added exception for that....but there are lot of @exception still to be added

comment:2 by Olly Betts, 13 years ago

Component: OtherDocumentation
Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.