Error handling
Brought to you by:
jrheinlaender
Some improvements (proposals) for error handling:
1. When a "Variable $x$ does not have a value", it's better to not show the error window and stop recalculation, but print something like this in the Formula:
x="Error:N/V"
or
x="Has no value"
2. Include the label of the equation in all error messages or better use the dialog like that one, that is used for "Duplicate error" (with the whole formula text and button "Edit formula").
BTW When I set priority=9, this means that the ticket has the least importance. Is that correct?
Anonymous
Hi zeon,
Yes, higher numbers mean less importance. At least that is my interpretation...
In the latest beta version error messages are displayed below the "Insert" and "Edit" dialogs. Have a look and tell me what you think.
Hi, Jan!
This is a good idea to put error messages into the dialog.
One moment about the dialog. I tried it on windows and what I see: the textbox is out of the dialog borders (screenshot). I've made a fix, but of course it doesn't work, because the geometry of the dialog is controlled by code.
Still it's better to not stop recalculations when the non-syntax error occurs. I'd like to see the error in the result of iformula, like in Calc/Excel. It's about such errors as "div/0" or "???".
About syntax errors. I don't remember what I actually did before, but sometimes I leaved equations unfinished, knowing they may occur errors, but I could fix them later after some modifications. E.g. I could look for some part of another equation and copy it. Now imath doesn't let to save "bad" equations.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Another idea:
Could we implement a function handling Errors like in Excel?
for example: a=iferror(x=NoValue; "" -> meaning: do nothing, don't show error message, just an empty space! )
I want to sum up some values in a Tablecell and don't want a warning if a Tablecell is empty!
EQDEF b= iferror((TABLECELL("Tabelle1", "F1")=NoValue;0) + iferror(TABLECELL("Tabelle1", "F2")=NoValue;0)
If a table cell is empty, you should get an empty string "" back, not a warning.
What warning are you seeing?
Hi, Jan!
In the 2.1.3~beta2 errors are totally ignored now. When we create new iFormula there is no warning message. We may create many iFormulas with errors -- that may be good. But nothing in the doc starting from the first iFormula with an error could be printed now. All iFormulas are empty. This is not what I meant, saying "do not stop recalculations". I'd like to see error warnings printed instead of the wrong part of iFormula.
Example.
%%ii@1@ EQDEF a=1/0
%%ii@2@ EQDEF b=val(2a)
%%ii@3@ EQDEF c=500
may be printed as
"a=Div/0 error!"
"b=Div/0 error"
"c=500"
Could you implement like this?
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Hi, I get the error: "Referenced cell does not exists. "
I kindly ask:
Could you not implement a error handling function for this matter, like described in the first statement?
I often want to sum up some values in a writer column. If I have more values to sum up, then I simply add on row.
My equation summing up the cells looks like this.
EQDEF g = TABLECELL("T1","F1") + TABLECELL("T1","F2") + TABLECELL("T1","F3") + TABLECELL("T1","F4") + TABLECELL("T1","F5")+TABLECELL("T1","F6")
g_k1=5.25 %%gg
If I have more tablecells specified in the equation it would not matter.
ifelse(TABLECELL("T1","F4")=error;0)
Hi,
do you know that Writer can sum up table cells, similar to Calc?
https://help.libreoffice.org/Writer/Calculating_Cell_Totals_in_Tables
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Yes I know, but sometimes I need do add some more table rows, because I have more values to sum up, and then I don't want to access the eqation and specify the new range I want to some up. Because it takes to much time.
It's unhandy.
But this works in Writer! If you insert a row in the middle of a range, the formula automatically updates the range to include the new row. Have you tried it?
Can we close this ticket?
About error handling, I am still thinking about it. I would like to implement a "quiet" mode where iMath does not stop for errors but instead prints them in the place of the formula.
But it is not so easy