Skip to content

Commit

Permalink
Add missing \n character in traceback string (lambdaclass#997)
Browse files Browse the repository at this point in the history
* Add missing \n character

* Add changelog entry

---------

Co-authored-by: Juan Bono <juanbono94@gmail.com>
  • Loading branch information
2 people authored and kariy committed Jun 23, 2023
1 parent 5f0cd03 commit 68160e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## Cairo-VM Changelog

#### Upcoming Changes

* Add missing `\n` character in traceback string [#997](https://github.com/lambdaclass/cairo-rs/pull/997)
* BugFix: Add missing `\n` character after traceback lines when the filename is missing ("Unknown Location")

* 0.11 Support
* Layouts update [#874](https://github.com/lambdaclass/cairo-rs/pull/874)
* Keccak builtin updated [#873](https://github.com/lambdaclass/cairo-rs/pull/873), [#883](https://github.com/lambdaclass/cairo-rs/pull/883)
Expand Down
5 changes: 4 additions & 1 deletion src/vm/errors/vm_exception.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ pub fn get_traceback(vm: &VirtualMachine, runner: &CairoRunner) -> Option<String
"{}\n",
location.to_string_with_content(&format!("(pc=0:{})", traceback_pc.offset))
)),
None => traceback.push_str(&format!("Unknown location (pc=0:{})", traceback_pc.offset)),
None => traceback.push_str(&format!(
"Unknown location (pc=0:{})\n",
traceback_pc.offset
)),
}
}
(!traceback.is_empty())
Expand Down

0 comments on commit 68160e6

Please sign in to comment.