Issie logo Issie

ErrorDisplay Module

How an error message is put on screen when the user may need to send it to us. Issie has two kinds of error. Most are about the design - a port with nothing driving it, two labels with one name - and the user reads them, fixes the design and never thinks about them again. A few are about ISSIE: a sheet file that cannot have been produced by the editor, a simulator that hit a state it says is impossible, a check that admits it should not have fired. Those say "please report it (Info -> Bug Reports)", and a report is only useful if it carries the message. **Which is which is not written down anywhere, and this deliberately does not ask.** Classifying `SimulationErrorType` case by case would be a second list to keep in step with the first, and it would go stale the moment a case was added. Length decides instead, and it decides correctly by construction: every message that asks to be reported is long, because it has to explain that the fault is Issie's and say what to do about it. A one-line message about a missing connection stays exactly as it was. Being long is also, on its own, a reason to make a message copyable - a user quoting a two-hundred-character explanation in a forum question retypes it or drops half of it - so the rule needs no exception for the design errors it also catches.

Nested modules

Modules Description

Constants

Functions and values

Function or value Description

errorMessage dispatch text

Full Usage: errorMessage dispatch text

Parameters:
    dispatch : Msg -> unit
    text : string

Returns: ReactElement

One error message, as text the user can read and - when it is long enough to be worth it - copy. The block preserves the line breaks the message was written with, which is the half of this that is not about copying at all: `InternalError` puts a stack trace in the message, and `str` inside a `div` rendered the whole of it as one line.

dispatch : Msg -> unit
text : string
Returns: ReactElement

Type something to start searching.