attempt to more closely follow the Reference's
"Error Message Conventions" in the contract error messages
This commit is contained in:
parent
aabe9d7bad
commit
3d48ef78f6
|
@ -278,7 +278,7 @@
|
||||||
[(blame-value blme)
|
[(blame-value blme)
|
||||||
(format "~a: ~a" (blame-value blme) self-or-not)]
|
(format "~a: ~a" (blame-value blme) self-or-not)]
|
||||||
[else
|
[else
|
||||||
(format "~a:" self-or-not)]))
|
(format "~a" self-or-not)]))
|
||||||
|
|
||||||
(define blame-parties (blame-positive blme))
|
(define blame-parties (blame-positive blme))
|
||||||
(define blaming-line
|
(define blaming-line
|
||||||
|
@ -308,9 +308,17 @@
|
||||||
(from-info (blame-negative blme)))])
|
(from-info (blame-negative blme)))])
|
||||||
(format " contract from: ~a" from-negative-message))))
|
(format " contract from: ~a" from-negative-message))))
|
||||||
|
|
||||||
|
(define custom-message-appears-to-start-with-fields?
|
||||||
|
(regexp-match? #rx"[^\n]*:" custom-message))
|
||||||
|
|
||||||
(combine-lines
|
(combine-lines
|
||||||
|
(if custom-message-appears-to-start-with-fields?
|
||||||
start-of-message
|
start-of-message
|
||||||
(format " ~a" custom-message)
|
(string-append start-of-message ";"))
|
||||||
|
(format (if custom-message-appears-to-start-with-fields?
|
||||||
|
" ~a"
|
||||||
|
" ~a")
|
||||||
|
custom-message)
|
||||||
context-lines
|
context-lines
|
||||||
(if context-lines
|
(if context-lines
|
||||||
contract-line
|
contract-line
|
||||||
|
|
Loading…
Reference in New Issue
Block a user