From: Adam R. <ad...@ex...> - 2011-04-28 00:57:22
|
We modified XPathException to provide the information that is required in XQuery 3.0 to support the try/catch expressions. As such all XQuery/XPath exceptions should have a defined error value and associated message. This works well for everything that is within the spec of F&O 3.0, as they define concise constant error codes and values. But, if you are working outside of that i.e. extension functions, then you need to define your own constant error values and descriptions. See the try/catch details in the XQuery 3.0 spec.... On 27 April 2011 23:50, Andrzej Jan Taramina <an...@ch...> wrote: > ...looks like many XPathException constructor signatures are now deprecated. Bit of a pain to > create ErrorCode()s for custom errors, but so be it. > > My question is whether the ErrorVal can be set safely to null for the constructor? > > XPathException( Expression expr, ErrorCode errorCode, String errorDesc, Sequence errorVal, > Throwable cause ) > > It looks like you can provide a description both in the ErrorCode object and separately in the > erroDesc. Can someone shed some light into why this is the case, and what happens if you provide > both or the description is missing in the ErrorCode or set to the empty string? Seems a bit odd to > have both. > > What is the errorVal used for? > > Can you tell I'm trying to update some of our custom extensions/functions to 1.5/Trunk? LOL > > Thanks! > > -- > Andrzej Taramina > Chaeron Corporation: Enterprise System Solutions > http://www.chaeron.com > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Exist-development mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-development > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |