-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Summary
Add stack trace capture to exceptions for better debugging. Currently exceptions only have .message() method.
Sub-issues
This feature has been split into smaller, focused issues:
- Change exception
.message()method to.messageproperty #55 - Change.message()method to.messageproperty (breaking change) - Add
stack_framebuilt-in type #56 - Addstack_framebuilt-in type - Implement shadow stack runtime for stack traces #57 - Implement shadow stack runtime for stack traces
- Add
.stackproperty to exceptions #58 - Add.stackproperty to exceptions - Add
stack_string()method to exceptions #59 - Addstack_string()method to exceptions
Dependency Graph
#55 (.message property) #56 (stack_frame type)
| |
| v
| #57 (shadow stack runtime)
| |
| v
| #58 (.stack property)
| |
| v
+------------------#59 (stack_string() method)
Implementation Order
- Change exception
.message()method to.messageproperty #55 -.message()→.message(can be done independently) - Add
stack_framebuilt-in type #56 -stack_frametype (foundation for stack traces) - Implement shadow stack runtime for stack traces #57 - Shadow stack runtime (depends on Add
stack_framebuilt-in type #56) - Add
.stackproperty to exceptions #58 -.stackproperty (depends on Addstack_framebuilt-in type #56, Implement shadow stack runtime for stack traces #57) - Add
stack_string()method to exceptions #59 -stack_string()method (depends on Add.stackproperty to exceptions #58)
Final API
exception DivisionByZero {
dividend: int,
}
fn main() {
divide(10, 0) catch e {
println(e.message); // Property (changed from method)
println(e.stack_string()); // Formatted stack trace
// Or iterate frames:
for (i: int, frame: stack_frame in e.stack) {
println("{} at {}:{}", frame.function, frame.file, frame.line);
}
};
}
Completion Criteria
This tracking issue will be closed when all sub-issues are completed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels