Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing \n character in traceback string #997

Merged
merged 4 commits into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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