description:
exception thrown out when preview data item using birt function birtdatetime.month() [0802]

build:
<2.5.2.v20100210-0630>

steps to reproduce:
1. new a data item using birt function birtdatetime.month() without detail parameter
2. preview

actual result:
unexpected exception thrown out

expect result:
releated exception should thrown out

errorlog:
org.eclipse.birt.report.service.api.reportserviceexception: error happened while running the report
   at org.eclipse.birt.report.service.reportengineservice.throwdummyexception(reportengineservice.java:1097)
   at org.eclipse.birt.report.service.reportengineservice.runandrenderreport(reportengineservice.java:926)
   at org.eclipse.birt.report.service.birtviewerreportservice.runandrenderreport(birtviewerreportservice.java:973)
   at org.eclipse.birt.report.service.actionhandler.birtgetpageallactionhandler.__execute(birtgetpageallactionhandler.java:131)
   at org.eclipse.birt.report.service.actionhandler.abstractbaseactionhandler.execute(abstractbaseactionhandler.java:90)
   at org.eclipse.birt.report.soapengine.processor.abstractbasedocumentprocessor.__executeaction(abstractbasedocumentprocessor.java:47)
   at org.eclipse.birt.report.soapengine.processor.abstractbasecomponentprocessor.executeaction(abstractbasecomponentprocessor.java:143)
   at org.eclipse.birt.report.soapengine.processor.birtdocumentprocessor.handlegetpageall(birtdocumentprocessor.java:183)
   at sun.reflect.nativemethodaccessorimpl.invoke0(native method)
   at sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39)
   at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25)
   at java.lang.reflect.method.invoke(method.java:585)
   at org.eclipse.birt.report.soapengine.processor.abstractbasecomponentprocessor.process(abstractbasecomponentprocessor.java:112)
   at org.eclipse.birt.report.soapengine.endpoint.birtsoapbindingimpl.getupdatedobjects(birtsoapbindingimpl.java:66)
   at sun.reflect.generatedmethodaccessor38.invoke(unknown source)
   at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25)
   at java.lang.reflect.method.invoke(method.java:585)
   at org.apache.axis.providers.java.rpcprovider.invokemethod(rpcprovider.java:397)
   at org.apache.axis.providers.java.rpcprovider.processmessage(rpcprovider.java:186)
   at org.apache.axis.providers.java.javaprovider.invoke(javaprovider.java:323)
   at org.apache.axis.strategies.invocationstrategy.visit(invocationstrategy.java:32)
   at org.apache.axis.simplechain.dovisiting(simplechain.java:118)
   at org.apache.axis.simplechain.invoke(simplechain.java:83)
   at org.apache.axis.handlers.soap.soapservice.invoke(soapservice.java:454)
   at org.apache.axis.server.axisserver.invoke(axisserver.java:281)
   at org.apache.axis.transport.http.axisservlet.dopost(axisservlet.java:699)
   at org.eclipse.birt.report.servlet.birtsoapmessagedispatcherservlet.dopost(birtsoapmessagedispatcherservlet.java:265)
   at javax.servlet.http.httpservlet.service(httpservlet.java:727)
   at org.apache.axis.transport.http.axisservletbase.service(axisservletbase.java:327)
   at javax.servlet.http.httpservlet.service(httpservlet.java:820)
   at org.eclipse.birt.report.servlet.birtsoapmessagedispatcherservlet.service(birtsoapmessagedispatcherservlet.java:122)
   at org.eclipse.equinox.http.registry.internal.servletmanager$servletwrapper.service(servletmanager.java:180)
   at org.eclipse.equinox.http.servlet.internal.servletregistration.handlerequest(servletregistration.java:90)
   at org.eclipse.equinox.http.servlet.internal.proxyservlet.processalias(proxyservlet.java:111)
   at org.eclipse.equinox.http.servlet.internal.proxyservlet.service(proxyservlet.java:59)
   at javax.servlet.http.httpservlet.service(httpservlet.java:820)
   at org.eclipse.equinox.http.jetty.internal.httpservermanager$internalhttpserviceservlet.service(httpservermanager.java:318)
   at org.mortbay.jetty.servlet.servletholder.handle(servletholder.java:502)
   at org.mortbay.jetty.servlet.servlethandler.handle(servlethandler.java:380)
   at org.mortbay.jetty.servlet.sessionhandler.handle(sessionhandler.java:181)
   at org.mortbay.jetty.handler.contexthandler.handle(contexthandler.java:765)
   at org.mortbay.jetty.handler.handlerwrapper.handle(handlerwrapper.java:152)
   at org.mortbay.jetty.server.handle(server.java:324)
   at org.mortbay.jetty.httpconnection.handlerequest(httpconnection.java:535)
   at org.mortbay.jetty.httpconnection$requesthandler.content(httpconnection.java:880)
   at org.mortbay.jetty.httpparser.parsenext(httpparser.java:748)
   at org.mortbay.jetty.httpparser.parseavailable(httpparser.java:213)
   at org.mortbay.jetty.httpconnection.handle(httpconnection.java:404)
   at org.mortbay.io.nio.selectchannelendpoint.run(selectchannelendpoint.java:409)
   at org.mortbay.thread.queuedthreadpool$poolthread.run(queuedthreadpool.java:520)
caused by: org.eclipse.birt.report.engine.api.engineexception: error happened while running the report
   at org.eclipse.birt.report.engine.api.impl.runandrendertask.dorun(runandrendertask.java:186)
   at org.eclipse.birt.report.engine.api.impl.runandrendertask.run(runandrendertask.java:75)
   at org.eclipse.birt.report.service.reportengineservice.runandrenderreport(reportengineservice.java:920)
... 48 more
caused by: java.lang.arrayindexoutofboundsexception: 0
   at org.eclipse.birt.core.script.function.bre.birtdatetime$function_month.getvalue(birtdatetime.java:271)
   at org.eclipse.birt.core.script.function.bre.function_temp.execute(breutility.java:50)
   at org.eclipse.birt.core.script.function.bre.birtdatetime.execute(birtdatetime.java:1322)
   at org.eclipse.birt.core.script.functionservice.impl.scriptfunction.execute(scriptfunction.java:146)
   at org.eclipse.birt.core.script.functionservice.impl.categorywrapper$1.call(categorywrapper.java:67)
   at org.mozilla.javascript.optimizer.optruntime.callprop0(optruntime.java:119)
   at org.mozilla.javascript.gen.c214._c0(:0)
   at org.mozilla.javascript.gen.c214.call()
   at org.mozilla.javascript.contextfactory.dotopcall(contextfactory.java:401)
   at org.mozilla.javascript.scriptruntime.dotopcall(scriptruntime.java:3003)
   at org.mozilla.javascript.gen.c214.call()
   at org.mozilla.javascript.gen.c214.exec()
   at org.eclipse.birt.core.script.javascriptevalutil.evaluaterawscript(javascriptevalutil.java:95)
   at org.eclipse.birt.core.script.javascriptevalutil.evaluatescript(javascriptevalutil.java:134)
   at org.eclipse.birt.data.engine.script.scriptevalutil.evaluatejsasexpr(scriptevalutil.java:769)
   at org.eclipse.birt.data.engine.expression.exprevaluateutil.doevaluaterawexpression(exprevaluateutil.java:266)
   at org.eclipse.birt.data.engine.expression.exprevaluateutil.evaluaterawexpression(exprevaluateutil.java:232)
   at org.eclipse.birt.data.engine.impl.prepareddummyquery$resultiterator.(prepareddummyquery.java:531)
   at org.eclipse.birt.data.engine.impl.prepareddummyquery$resultiterator.(prepareddummyquery.java:508)
   at org.eclipse.birt.data.engine.impl.prepareddummyquery$queryresults.getresultiterator(prepareddummyquery.java:367)
   at org.eclipse.birt.report.engine.data.dte.queryresultset.(queryresultset.java:98)
   at org.eclipse.birt.report.engine.data.dte.dtedataengine.doexecutequery(dtedataengine.java:168)
   at org.eclipse.birt.report.engine.data.dte.abstractdataengine.execute(abstractdataengine.java:265)
   at org.eclipse.birt.report.engine.executor.executioncontext.executequery(executioncontext.java:1875)
   at org.eclipse.birt.report.engine.executor.queryitemexecutor.executequery(queryitemexecutor.java:80)
   at org.eclipse.birt.report.engine.executor.dataitemexecutor.execute(dataitemexecutor.java:75)
   at org.eclipse.birt.report.engine.internal.executor.dup.suppressduplicateitemexecutor.execute(suppressduplicateitemexecutor.java:43)
   at org.eclipse.birt.report.engine.internal.executor.wrap.wrappedreportitemexecutor.execute(wrappedreportitemexecutor.java:46)
   at org.eclipse.birt.report.engine.internal.executor.l18n.localizedreportitemexecutor.execute(localizedreportitemexecutor.java:34)
   at org.eclipse.birt.report.engine.layout.html.htmlblockstackinglm.layoutnodes(htmlblockstackinglm.java:65)
   at org.eclipse.birt.report.engine.layout.html.htmlpagelm.layout(htmlpagelm.java:90)
   at org.eclipse.birt.report.engine.layout.html.htmlreportlayoutengine.layout(htmlreportlayoutengine.java:99)
   at org.eclipse.birt.report.engine.api.impl.runandrendertask.dorun(runandrendertask.java:170)
... 50 more
see these two lines in the stack:

caused by: java.lang.arrayindexoutofboundsexception: 0
   at
org.eclipse.birt.core.script.function.bre.birtdatetime$function_month.getvalue(birtdatetime.java:271)


does the month function check the input month parameter value?
refine parameter count check step.
proper exception thrown out. verify the bug.
error evaluating javascript expression. script engine error: wrapped org.eclipse.birt.core.exception.birtexception: incorrect number of the argument(s).