Update 'Error Handling'

Sasha Koshka 2022-10-12 07:20:20 +00:00
parent a05d26a0c5
commit 8b9f57f757

@ -10,13 +10,13 @@ When writing error messages, present the user with something very plain. Do not
For example, say you wanted to produce an error when a value of one type can't be passed as another type. You could do: For example, say you wanted to produce an error when a value of one type can't be passed as another type. You could do:
``` ```
type mismatch of String:1 (aka {U32 ..}:1), U64:1 type mismatch: cannot pass String:1 (aka {U32 ..}:1) into U64:1
``` ```
... Which is messy, and contains useless information, thereby sacrificing clarity. You could try: ... Which is messy, and contains useless information, thereby sacrificing clarity. You could try:
``` ```
type mismatch String:1 U64:1 type mismatch U64:1 String:1
``` ```
... But this does not properly convey its meaning. It sacrifices clarity to achieve a mediocre amount of brevity. ... But this does not properly convey its meaning. It sacrifices clarity to achieve a mediocre amount of brevity.