Add optional message to fail.
This commit is contained in:
parent
b5c73605ea
commit
2235fb73ef
10 changed files with 41 additions and 13 deletions
|
|
@ -825,8 +825,13 @@ fn print_expr(&ps s, &@ast::expr expr) {
|
|||
case (ast::expr_path(?path,_)) {
|
||||
print_path(s, path);
|
||||
}
|
||||
case (ast::expr_fail(_)) {
|
||||
case (ast::expr_fail(_, ?str)) {
|
||||
word(s.s, "fail");
|
||||
alt (str) {
|
||||
case (some(?msg)) {
|
||||
word(s.s, #fmt("\"%s\"", msg));
|
||||
}
|
||||
}
|
||||
}
|
||||
case (ast::expr_break(_)) {
|
||||
word(s.s, "break");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue