I have a formula field in a grid with this definition.
<userFormula text="1-(C/R)">
<formulaVars>
<C>landedCost</C>
<R>homeRetail</R>
</formulaVars>
</userFormula>
When the homeRetail field in the record is zero I get the following exception when the grid rows are being loaded. If I remove the formula column the problem goes away.
Is there some way to protect a formula from this sort of divide by zero error?
Ultimately I see this error in the Eclipse console
<userFormula text="1-(C/R)">
<formulaVars>
<C>landedCost</C>
<R>homeRetail</R>
</formulaVars>
</userFormula>
When the homeRetail field in the record is zero I get the following exception when the grid rows are being loaded. If I remove the formula column the problem goes away.
Is there some way to protect a formula from this sort of divide by zero error?
Code:
10:44:31.497 [ERROR] [ipgui] Uncaught exception escaped com.google.gwt.dev.shell.HostedModeException: invoke arguments: JS double value -Infinity out of range for a int at com.google.gwt.dev.shell.JsValueGlue.getIntRange(JsValueGlue.java:256) at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:144) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:65) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213) at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363) at java.lang.Thread.run(Thread.java:680)
Code:
Uncaught JavaScript exception [uncaught exception: [Exception... "Cannot modify properties of a WrappedNative" nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)" location: "JS frame :: http://127.0.0.1:8888/ipgui/sc/modules/ISC_Core.js?isc_version=7.0.js :: <TOP_LEVEL> :: line 946" data: no]] in , line 0
Comment