Opened 20 years ago
Closed 18 years ago
#190 closed enhancement (invalid)
In order to improve the error messages
Reported by: | imendez | Owned by: | Víctor de Buen Remiro |
---|---|---|---|
Priority: | lowest | Milestone: | |
Component: | Various | Version: | 1.1.1 |
Severity: | minor | Keywords: | |
Cc: |
Description
This code:
Text SelectorLetraA(Set set)
{
};
Set G = [["b" ? ]];
Text U = SelectorLetraA(c[1]);
Set A = EvalSet(G, Text(Set c) { SelectorLetraA(c) });
yields twice the same error because the function "SelectorLetraA" contains a
mistake, since the set "sel" can be empty, and then you can't take sel[1][1]
element.
It makes imposible to create both "A" and "U" objects, due to the same error. But
the error message that TOL returns is different:
ERROR: c no es un objeto de tipo Set.
ERROR: Argumentos erróneos para Text SelectorLetraA (Set set)
ERROR: U no se pudo crear.
ERROR: Intento de acceso al elemento 1-esimo de un conjunto de 0 elementos
ERROR: Fallo en la función "SelectorLetraA"
ERROR: Fallo en la función ""
ERROR: Fallo en EvalSet.
In the first case, you can know that "U" can't be created, but in the second case,
when trying to create "A", you only know there is a mistake in "EvalSet", so if you
have a lot of "EvalSet" in your code, you will spent much time trying to find the
error.
It's only a dummy example to show that an improvement in error and warning
messages can supply a valuable time to the analyst.
I think it's not a high-priority theme, but in the future it may be a good way to
improve TOL.
Regards
Change History (2)
comment:1 Changed 18 years ago by
Owner: | changed from danirus to Víctor de Buen Remiro |
---|
comment:2 Changed 18 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Sorry by this delayed answer.
When you writes
Text U = SelectorLetraA(c[1]);
c has not be declared, and error messages are working fine in this case
If you writes
Text U = SelectorLetraA(G[1]);
then TOL will answer
ERROR: [31] Intento de acceso al elemento 1-esimo de un conjunto de 0 elementos
ERROR: [32] Fallo en la función "SelectorLetraA"
ERROR: [33] U no se pudo crear.