Bug 153574 - RFE: Add information about errors, error codes or error numbers in Calc (that is currently not included)
Summary: RFE: Add information about errors, error codes or error numbers in Calc (that...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0
Keywords: easyHack
Depends on:
Blocks: HelpGaps-NewFeatures
  Show dependency treegraph
 
Reported: 2023-02-12 22:28 UTC by ady
Modified: 2023-05-09 11:59 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ady 2023-02-12 22:28:03 UTC
When using 
 https://help.libreoffice.org

(and/or the built-in help system), it is not so easy to find information about errors, error codes or error numbers in relation to Calc's formulas (or their results).

It is particularly relevant for the #N/A error (at the moment of writing).

ATM there are, for instance:
 * NA 
https://help.libreoffice.org/7.5/en-US/text/scalc/01/04060104.html#bm_id3156275
 * Error Codes in LibreOffice Calc 
https://help.libreoffice.org/7.5/en-US/text/scalc/05/02140000.html
 * ERRORTYPE function
https://help.libreoffice.org/7.5/en-US/text/scalc/01/04060109.html#bm_id3153114
 * ERROR.TYPE function
https://help.libreoffice.org/7.5/en-US/text/scalc/01/func_error_type.html#bm_id346793467934679

While less directed to common simple final users (of Calc), there is also (not part of Calc):
* Error Function 
https://help.libreoffice.org/7.5/en-US/text/sbasic/shared/03050300.html

and additionally, there is the Guide (CG75-CalcGuide.pdf, the latest ATM).

But there seems to be no info with more details about (some of) the errors (and particularly for #N/A), nor a simple way for newbies to find information about situations like the following:
 "what is this #N/A error result that I am getting? Why? What should I do with this?

(To be clear, I know the answer. This is only a rhetorical question, in order to explain the need for this RFE.)


I have tried several different keywords, sometimes with or without "#" and/or "!" and/or "?" and/or "/" (as in NA, N/A, #NA, NA(), #N/A...), and sometimes with or without additional words such as "error", "code", in plural, in uppercase, combining them...

Please also note that even in the aforementioned links, there is little or no relevant information about the #N/A error, not even in the help page for the NA() function.

In particular, the help page that lists the error codes (already mentioned above):
 https://help.libreoffice.org/7.5/en-US/text/scalc/05/02140000.html

does not include the #N/A error.

Moreover, I couldn't find any mention about #N/A in the Guide (CG75-CalcGuide.pdf, the latest ATM).

Even if the #N/A error were to be considered a different category than those listed in that help page – IDK whether that's the case – from the POV of a newbie "an error (message) is still an error (message)" (and a newbie might probably won't know nor care about categories of errors in Calc).

IMHO, either all errors seen by final users should be listed (and minimally explained, at least), or some other help page should include them somewhere. This is the point of this RFE.
Comment 1 Olivier Hallot 2023-02-12 23:37:16 UTC
Page to fix: text/scalc/05/02140000.xhp

1) Add <bookmark-value> to each entry (error code) of the table, e.g. 

<bookmark-value>Calc error 501</bookmark-value>
<bookmark-value>Calc error ###</bookmark-value>
...

2) add entry for N/A in table.
"The formula can’t find what it’s been asked to look for."
Comment 2 ady 2023-03-06 17:26:48 UTC
Adding request for related minor corrections...

For:
 text/scalc/05/02140000.xhp

* In relation to Err:525:
<paragraph xml-lang="en-US" id="par_id3148428" role="tablecontent">invalid names (instead of Err:525 ...

** Capitalize "invalid names" > "Invalid names" in accordance to the rest of the items.


* In relation to Err:540:
<paragraph xml-lang="en-US" id="par_id881549825900965" role="tablecontent"> Happens if a function that requires (re)loading of external sources is encountered and the user hasn't confirmed reloading of external sources yet  </paragraph>

** Instead of "Happens if a function that requires...", it should simply be "A function that requires...", to be more consistent with the rest of the items. 
The sentence should also end with a stop/period/dot.


* In relation to Err:526:
<paragraph xml-lang="en-US" id="par_id3083286" role="tablecontent">Obsolete, no longer used, but could come from old documents if the result is a formula from a domain.</paragraph>

** The term "domain" is used in this help page in the errors: 504, 525 and 526. As a user, I do not know what this term refers to in this context. This is not good, considering that we are talking about a help page.

Is the term "domain" (fully) equivalent to "(cell) range"? If it isn't, where such expression is defined for this context?
Although I am intrigued by the term, I am not necessarily asking for an answer to be written here (welcome anyway), but I'm asking for consistency and clarity in the help files. If the term "cell range" is equivalent in this case / context (which I do _not_ know), perhaps it would be better to use a commonly-used term rather than some ambivalent less-used one, such as "domain"?


* At: 
https://help.libreoffice.org/latest/en-US/text/scalc/01/04060104.html?DbPAR=CALC#bm_id31536851

that is:
 text/scalc/01/04060104.xhp

Quote1:
<paragraph id="par_id31563161" role="paragraph" xml-lang="en-US"><ahelp hid="HID_FUNC_IFERROR">Returns the value if the cell does not contains 

Quote2:
<paragraph id="par_id31491051" role="paragraph" xml-lang="en-US"><ahelp hid="HID_FUNC_IFNA">Returns the value if the cell does not contains

In both cases (IFERROR and IFNA):
"Returns the value if the cell does not contains..."

...both should be:
s/contains/contain (i.e. no final "s").
Comment 3 ady 2023-03-07 13:11:01 UTC
My apologies; for some reason in my prior comment I forgot to add the following item.

For:
 text/scalc/05/02140000.xhp

* In relation to Err:525:
<paragraph xml-lang="en-US" id="par_id3156259" role="tablecontent">An identifier could not be evaluated, for example, no valid reference, no valid domain name, no column/row label, no macro, incorrect decimal divider, add-in not found.</paragraph>

** If by "decimal divider" the intention is "decimal separator", please modify the term to the latter.
Comment 4 Olivier Hallot 2023-04-26 15:54:56 UTC
(In reply to ady from comment #2)
> Adding request for related minor corrections...
(snip)
> * In relation to Err:526:
> <paragraph xml-lang="en-US" id="par_id3083286" role="tablecontent">Obsolete,
> no longer used, but could come from old documents if the result is a formula
> from a domain.</paragraph>
> 
> ** The term "domain" is used in this help page in the errors: 504, 525 and
> 526. As a user, I do not know what this term refers to in this context. This
> is not good, considering that we are talking about a help page.
> 
> Is the term "domain" (fully) equivalent to "(cell) range"? If it isn't,
> where such expression is defined for this context?
> Although I am intrigued by the term, I am not necessarily asking for an
> answer to be written here (welcome anyway), but I'm asking for consistency
> and clarity in the help files. If the term "cell range" is equivalent in
> this case / context (which I do _not_ know), perhaps it would be better to
> use a commonly-used term rather than some ambivalent less-used one, such as
> "domain"?

The "domain" nomenclature is sub-optimal for the end user.

for error 526: It seems that "domain" is the current set of Calc functions. IMHO, the error is an "syntax error" from a function that may not exist anymore or has a different argument signature in the current set of valid Calc functions (including extension-provided functions).

Comparing to Err:525, "no valid domain name" seems to indicate that the function is not on the current set of valid functions.

Comparing to err:504, "a domain reference instead of cell reference" can mean a function name reference instead of a cell reference...

What is your take?
Comment 5 ady 2023-04-26 16:35:15 UTC
(In reply to Olivier Hallot from comment #4)
> What is your take?

I don't have anything specific to comment regarding the use of the "domain" terminology. As I said, it is not a term that says much (or anything) to us, common users of spreadsheets.


Now, since we are here already talking about:

 source/text/scalc/05/02140000.xhp

...and there have been changes related to it lately, please allow me to add an additional request for correction:


* In file:

 source/text/scalc/05/02140000.xhp

...there is a line (not counting for indentation here):

<paragraph xml-lang="en-US" id="par_id3153737" role="tablecontent">Internal syntax error (instead of Err:521 cell displays #NULL!)</paragraph>


The above line includes the term "Internal syntax error".

Based on:

https://gerrit.libreoffice.org/c/core/+/150654

...the term "Internal syntax error" is incorrect.

Instead, it should be "No code or no intersection".
Comment 6 Eike Rathke 2023-04-26 17:38:04 UTC
I don't know who came up why with that "domain" thing..

Err:526 was an error that apparently could had been loaded from the old binary file format, which we don't support anymore, for some references thing related. It's gone and help for this can be removed.

Err:525 #NAME? "no valid domain name" should be "no valid function name" or "unknown function name"; "incorrect decimal divider" is nonsense, should be "incorrect decimal separator" instead (e.g. entering 123,45 if the decimal separator is . dot and the function parameter separator is not , comma could lead to #NAME?)

Err:504 "domain reference instead of cell reference" makes no sense, I also don't know what could had been meant instead. We usually set that IllegalParameter error when an actual argument's type does not match the expected type, or for unexpected parameters, but also on some other occasions. It's a kind of all-round-error if not other errors classified.

Err:513 btw the 64KB string length limit in the interpreter is now 256MB, and "Compiler: an identifier in the formula exceeds 64 KB in size" is wrong, the length limit for one identifier (function name, ...) is 1024 characters.

Err:514 "Sort operation attempted on too much numeric data (max. 100000) or a calculation stack overflow" is wrong. It's only a compiler but more interpreter internal stack overflow error, not sort related.

Err:538 (that currently has no description) is the sort maximum exceeded and the maximum is twice the maximum number of rows, so for 1048576 rows 2097152 entries. The same Err:538 is also used whenever a temporary matrix could not be allocated due to its size requirement (probably numbers not to be documented because easily misleading or subject to internal change: for 64-bit systems that's limited to 6GB which roughly fits 500 million numeric values (completely different number for strings); for 32-bit systems that's 1GB with ~85 million numeric values).

Yes, Err:521 long error description was changed.
Comment 7 Olivier Hallot 2023-04-27 12:30:09 UTC
first patch submitted
https://git.libreoffice.org/help/commit/77b1a5a7118478c2b3a86fd43cfc68e336ac913c

(bad bug number in commit msg)
Comment 8 Commit Notification 2023-05-08 18:21:55 UTC
Olivier Hallot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/baa3ad9698dfc80375109478ff88d7929dfb62ea

tdf#153574 Update error code Help page
Comment 9 ady 2023-05-08 21:31:39 UTC
(In reply to Eike Rathke from comment #6)
> Err:513 btw the 64KB string length limit in the interpreter is now 256MB,
> and "Compiler: an identifier in the formula exceeds 64 KB in size" is wrong,
> the length limit for one identifier (function name, ...) is 1024 characters.

The new help file says instead (not counting for indentation here):

<emph>Compiler:</emph> an identifier in the formula exceeds 1024 bytes in size. <emph>Interpreter:</emph> a result of a string operation exceeds 256 MB in size.</paragraph>


* In this context, is "1024 characters" the same as "1024 bytes"?


For the Interpreter, it now says 256MB in size. Is the "256MB" accurate? For instance:

=REPT("1234567890"; 10^8)

...already generates Err:513. I don't know how that amount of characters relates to "256MB" in this context.

* Is this 256MB really the threshold?
Comment 10 Eike Rathke 2023-05-09 11:36:06 UTC
(In reply to ady from comment #9)
> * In this context, is "1024 characters" the same as "1024 bytes"?
No. It should be 1024 characters (that detail slipped my attention when I took a look), or to be precise 1024 UTF-16 code points (though users probably wouldn't know what that is), which can be less than 1024 characters if surrogates are used.

> For the Interpreter, it now says 256MB in size. Is the "256MB" accurate?
Well it's max signed int32 / 8 so 2147483647/8 that is 268435455 (268435455.875) so 255.999999046326MiB ...

> =REPT("1234567890"; 10^8)
> ...already generates Err:513.
Because it would result in 1000000000 (100000000*"1234567890") characters.

> I don't know how that amount of characters
> relates to "256MB" in this context.
It's greater than 256M characters.

> * Is this 256MB really the threshold?
Yes.


I'll change the slightly confusing bytes vs characters and 256MB (it's not bytes either) wording.
Comment 11 Commit Notification 2023-05-09 11:59:56 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/59861677cc4ca59020718033f675b54f49fc0b74

Size in characters, not bytes; tdf#153574 follow-up