|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Error bug, "Document exists" not true
by Danny Brian-2
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message Hi -
Trying to add a document to a container with unique index constraints (where that indexed data it not unique) results in an error, "Document exists". The unique index here is for @seq, and a record exists with the same value here: dbxml> put doc234 '<record id="aa" seq="118042"/>' s ... putDocument failed, Error: Document exists: doc234 ... Here's a patch to just pass through the error string thrown by the indexer; I know that this is not quite what is wanted, because the message doesn't include the node name (which I didn't investigate how to get) or the context of putDocument. But it's better for my sanity. - Danny --- dbxml-2.2.13/dbxml/src/dbxml/Container.cpp.orig Mon Jul 31 01:44:54 2006 +++ dbxml-2.2.13/dbxml/src/dbxml/Container.cpp Mon Jul 31 02:10:06 2006 @@ -555,7 +555,7 @@ catch (XmlException &xe) { if (xe.getExceptionCode() == XmlException::UNIQUE_ERROR) { std::ostringstream oss; - oss << "Document exists: " << document.getName (); + oss << xe.what(); throw XmlException (XmlException::UNIQUE_ERROR, oss.str() ); } else throw; // re-throw ------------------------------------------ To remove yourself from this list, send an email to xml-unsubscribe@... |
|
|
Re: Error bug, "Document exists" not true
by John Snelson-4
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message Hi Danny,
Thanks for the patch. However, a similar change has already been made in our latest code. John Danny Brian wrote: > Hi - > > Trying to add a document to a container with unique index constraints > (where that indexed data it not unique) results in an error, "Document > exists". The unique index here is for @seq, and a record exists with the > same value here: > > dbxml> put doc234 '<record id="aa" seq="118042"/>' s > ... putDocument failed, Error: Document exists: doc234 ... > > Here's a patch to just pass through the error string thrown by the > indexer; I know that this is not quite what is wanted, because the > message doesn't include the node name (which I didn't investigate how to > get) or the context of putDocument. But it's better for my sanity. > > - Danny > > > > --- dbxml-2.2.13/dbxml/src/dbxml/Container.cpp.orig Mon Jul 31 > 01:44:54 2006 > +++ dbxml-2.2.13/dbxml/src/dbxml/Container.cpp Mon Jul 31 02:10:06 2006 > @@ -555,7 +555,7 @@ > catch (XmlException &xe) { > if (xe.getExceptionCode() == XmlException::UNIQUE_ERROR) { > std::ostringstream oss; > - oss << "Document exists: " << document.getName(); > + oss << xe.what(); > throw XmlException(XmlException::UNIQUE_ERROR, > oss.str() > ); > } else > throw; // re-throw > > > > ------------------------------------------ > To remove yourself from this list, send an > email to xml-unsubscribe@... > ------------------------------------------ To remove yourself from this list, send an email to xml-unsubscribe@... |
| Free embeddable forum powered by Nabble | Forum Help |