Menu

#26 Error handling

Next_Release
accepted
None
3
2018-08-17
2015-03-13
No

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?

Discussion

  • Jan Rheinlaender

    Hi zeon,

    1. Implemented to print "???" for variables without value (Since version 2.1.1, commit 0540cb91608d980dfbeb6312a1508ea9235674a1 on June 4th 2015)
    2. Working on it!

    Yes, higher numbers mean less importance. At least that is my interpretation...

     
  • Jan Rheinlaender

    • status: open --> accepted
    • assigned_to: Jan Rheinlaender
    • Priority: 9 --> 3
     
  • Jan Rheinlaender

    In the latest beta version error messages are displayed below the "Insert" and "Edit" dialogs. Have a look and tell me what you think.

     
  • zeon_account_will_be_deleted

    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.

     
  • Anonymous

    Anonymous - 2016-04-16

    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)

     
  • Jan Rheinlaender

    If a table cell is empty, you should get an empty string "" back, not a warning.
    What warning are you seeing?

     
  • zeon_account_will_be_deleted

    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?

     
  • Anonymous

    Anonymous - 2016-05-01

    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)

     
  • Jan Rheinlaender

    Hi,

    do you know that Writer can sum up table cells, similar to Calc?

    https://help.libreoffice.org/Writer/Calculating_Cell_Totals_in_Tables

     
  • Anonymous

    Anonymous - 2016-06-07

    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.

     
  • Jan Rheinlaender

    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?

     
  • zeon_account_will_be_deleted

    Can we close this ticket?

     
  • Jan Rheinlaender

    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

     

Anonymous
Anonymous

Add attachments
Cancel