qvm icon indicating copy to clipboard operation
qvm copied to clipboard

bad error message for `echo foo.quil | qvm`

Open stylewarning opened this issue 5 years ago • 3 comments

An error in the wild, someone echoing instead of cating, leads to the following:

$ echo foo.quil | qvm
******************************
* Welcome to the Rigetti QVM *
******************************
Copyright (c) 2016-2019 Rigetti Computing.

(Configured with 8192 MiB of workspace and 8 workers.)

! ! ! Condition raised: Couldn't find match at position 3 within the lexer CL-QUIL::LINE-LEXER.

This is of course sensible in its behavior, but the error message is awful and should be more helpful.

stylewarning avatar Mar 28 '19 04:03 stylewarning

Hello I am interested in working on this.

matt-y avatar Jun 20 '19 18:06 matt-y

Hello that would be great! What would a good error message look like?

stylewarning avatar Jun 20 '19 19:06 stylewarning

FWIW, the error message has improved since the creation of this issue:

$ echo test.quil | qvm --log-level emerg --quiet
! ! ! Condition raised: At line 1: unexpected input text "." in "test.quil"

It could be clearer however by having QVM report that it is trying to parse the string from stdin, rather than from the file.

notmgsk avatar Jun 20 '19 20:06 notmgsk