[ET Trac] #1881: Unclear error message for parameter file error

Roland Haas trac-noreply at einsteintoolkit.org
Thu Mar 23 12:25:10 CDT 2023


#1881: Unclear error message for parameter file error

 Reporter: Erik Schnetter
   Status: open
Milestone: 
  Version: development version
     Type: bug
 Priority: minor
Component: Cactus

Comment (by Roland Haas):

The error message is still not optimal since it eg points to the wrong line \(though at least it now shows the incorrect line\). Since the parfile attachment seems to have vanished I tried with a simpler reproducer:  

```perl
Cactus::cctk_itlast = 10

# this line is wrong
Cactus::cctk_full_warnings

# this line is ok
Cactus::cctk_run_title = "lineno test"
```

which fails with:

```text
Activating thorn Cactus...Success -> active implementation Cactus
WARNING level 0 from host ekohaes8 process 0
  in thorn cactus, file lineno.par:7:
  -> ERROR IN PARAMETER FILE:Parse Error
Expected one of the following characters: '[', '='
Cactus::cctk_full_warnings

# this line is ok
Cactus::cctk_run_title = "lineno test"
^

WARNING level 0 from host ekohaes8 process 0
  in thorn cactus, file lineno.par:7:
  -> ERROR IN PARAMETER FILE:Parse Error
Expected one of the following characters: '[', '='
Cactus::cctk_full_warnings

# this line is ok
Cactus::cctk_run_title = "lineno test"
^

--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.
```

maybe instead of pointing to the first wrong character, point to the last good one \(not counting whitespace and comments\) would be better in this case? Though it obviously comes with its own issues such as this file:

```
Cactus::cctk_itlast = 12
# now an incorrect line
::this_does_not_work = 42
```

which should point out that `:` is wrong, since the line above could be parsed correctly. Ie the error message would be state dependent \(and will almost certainly violate a nice layered approach to the parser\).

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/1881/unclear-error-message-for-parameter-file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/trac/attachments/20230323/daf428bf/attachment.html 


More information about the Trac mailing list