-
Notifications
You must be signed in to change notification settings - Fork 5
Dealing with errors
The initial report of an error is concise. hub why
provides a more detailed explanation of what has gone wrong, and may suggest a help topic, or how it relates to other errors that are reported at the same time.
This shows the line where the error occurred with the exact place where the error occurred underlined in red, occasionally useful when the line is a long one.
This gives the course a runtime error took as it passed up the stack. Unlike why
and where
it doesn't require an error number, because there can only ever be one runtime error thrown at a time, unlike syntax errors.
When a runtime error is the result of a type mismatch, the initial error report will give the expected and actual types, but won't give the actual value or values passed because this might be a firehose of information. This allows you to see the values should you wish.
When such values are available, the initial error report will contain a note to that effect, and hub values
will show the values involved. As with hub trace
, there is no need to specify an error number because only one runtime error can happen at a time.
Repeats the list of the last set of errors thrown, to save you from having to scroll up looking for it.
Gives helpful information on the topic. (Although at present the help topics are insufficient in number and idiosyncratically chosen.)
Lists the help topics.
🧿 Pipefish is distributed under the MIT license. Please steal my code and ideas.