Potential bug thrown in 'out:format' when argument is an empty sequence
Monday, 2 March 2015 · 2 messages
SG
Seenivasan Gunabalan2 Mar 2015 18:07 #
Hi all,
Executing,
out:format("hello %s", ())throws Potential bug error. It is clear that 'out:format' function expects an argument of type item(), but this error seems scary :)
Error:
Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk at mailman.uni-konstanz.de
Version: BaseX 8.1 beta
Java: Oracle Corporation, 1.7.0_75
OS: Linux, amd64
Stack Trace:
java.lang.NullPointerException
at org.basex.query.func.out.OutFormat.item(OutFormat.java:25)
at org.basex.query.func.StandardFunc.optimize(StandardFunc.java:80)
at org.basex.query.func.StandardFunc.compile(StandardFunc.java:74)
at org.basex.query.MainModule.compile(MainModule.java:73)
at org.basex.query.QueryCompiler.compile(QueryCompiler.java:113)
at org.basex.query.QueryCompiler.compile(QueryCompiler.java:104)
at org.basex.query.QueryContext.analyze(QueryContext.java:323)
at org.basex.query.QueryContext.compile(QueryContext.java:312)
at org.basex.query.QueryProcessor.compile(QueryProcessor.java:68)
at org.basex.core.cmd.AQuery.query(AQuery.java:75)
at org.basex.core.cmd.XQuery.run(XQuery.java:22)
at org.basex.core.Command.run(Command.java:379)
at org.basex.core.Command.execute(Command.java:95)
at org.basex.gui.GUI.exec(GUI.java:466)
at org.basex.gui.GUI.access$400(GUI.java:41)
at org.basex.gui.GUI$7.run(GUI.java:410)
Query:
out:format("hello %s", ())Best Regards,
Seenivasan
CG
Christian Grün2 Mar 2015 23:03 #
Fixed. Thanks.
Quoted text · Seenivasan Gunabalan · 41 lines
On Mon, Mar 2, 2015 at 6:07 PM, Seenivasan Gunabalan <seenivasan.gunabalan at dedalus.eu> wrote: > Hi all, > Executing, > > out:format("hello %s", ()) > > throws Potential bug error. It is clear that 'out:format' function expects > an argument of type item(), but this error seems scary :) > > Error: > Improper use? Potential bug? Your feedback is welcome: > Contact: basex-talk at mailman.uni-konstanz.de > Version: BaseX 8.1 beta > Java: Oracle Corporation, 1.7.0_75 > OS: Linux, amd64 > Stack Trace: > java.lang.NullPointerException > at org.basex.query.func.out.OutFormat.item(OutFormat.java:25) > at org.basex.query.func.StandardFunc.optimize(StandardFunc.java:80) > at org.basex.query.func.StandardFunc.compile(StandardFunc.java:74) > at org.basex.query.MainModule.compile(MainModule.java:73) > at org.basex.query.QueryCompiler.compile(QueryCompiler.java:113) > at org.basex.query.QueryCompiler.compile(QueryCompiler.java:104) > at org.basex.query.QueryContext.analyze(QueryContext.java:323) > at org.basex.query.QueryContext.compile(QueryContext.java:312) > at org.basex.query.QueryProcessor.compile(QueryProcessor.java:68) > at org.basex.core.cmd.AQuery.query(AQuery.java:75) > at org.basex.core.cmd.XQuery.run(XQuery.java:22) > at org.basex.core.Command.run(Command.java:379) > at org.basex.core.Command.execute(Command.java:95) > at org.basex.gui.GUI.exec(GUI.java:466) > at org.basex.gui.GUI.access$400(GUI.java:41) > at org.basex.gui.GUI$7.run(GUI.java:410) > Query: > out:format("hello %s", ()) > > > Best Regards, > Seenivasan >
Written for BaseX 8.0. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery