Closed Bug 862921 Opened 10 years ago Closed 10 years ago
Array .js: Generalize Assert Sequential Is OK logic and improve its error message .
1. If one passes a `mode` argument without a property named `mode`, the previous version will fall into the ThrowError branch (because mode.mode => undefined and undefined !== "seq") 2. The old error message used the strings "par" and "seq", which might make the reader think that the assertion is solely about the appropriate value for the `mode` property, which happens to take on the values "par" or "seq" in some cases. But the real condition being signalled here is not about the string values "par" or "seq"; it is instead about the dynamic behavior of the runtime system. This changes the error message to use longer phrases, which should hopefully make the intent clearer. There is a third change I want to make, changing the logic of the conditional guard further, but that change is not as important to me as the two above.
Assignee: general → pnkfelix
Status: NEW → ASSIGNED
Comment on attachment 738587 [details] [diff] [review] patch A v1: fix the guard and the message. (removing review request until I resolve why this is not rendering in splinter.)
(this is the same as 738587 except generated without `--color` flag.)
Attachment #738587 - Attachment is obsolete: true
Attachment #738596 - Flags: review?(nmatsakis)
Attachment #738596 - Flags: review?(nmatsakis) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.