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
[engine] Support tracebacks in engine traces; only show engine traces… #4549
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
7099b507dd3a68612ab801d3a0cac99ec66c1705 | ||
4055117f54043f8430e95eaf7b591e9620b21ba0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,8 +92,8 @@ impl RawNode { | |
(RawStateTag::Empty as u8, externs::create_exception("No value")), | ||
Some(Ok(v)) => | ||
(RawStateTag::Return as u8, v), | ||
Some(Err(Failure::Throw(msg))) => | ||
(RawStateTag::Throw as u8, msg), | ||
Some(Err(Failure::Throw(exc, _))) => | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Carrying the rendered backtrace around like this feels redundant, although it's probably not a huge deal. Might be cleaner to have a python function to render an exception? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem is that python 2.7 doesn't attach the stack info to the exception. I could grab the stack and pass as a Value instead of a Buffer, and then render at render time, but I'm not sure it would be cheaper. |
||
(RawStateTag::Throw as u8, exc), | ||
Some(Err(Failure::Noop(noop))) => | ||
(RawStateTag::Noop as u8, externs::create_exception(&format!("{:?}", noop))), | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to figure out the appropriate tests here. Also, this implementation feels ugly. I could back out the trace eliding, but that doesn't feel quite right either.