Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
mseepgood
9 months ago
|
parent
|
context
|
favorite
| on:
(On | No) Syntactic Support for Error Handling
How would you set a breakpoint on the error return case?
zffr
8 months ago
|
next
[–]
You set a breakpoint directly before this line, and then step forward. If you need the breakpoint to only trigger when there is an error, then you can use a conditional breakpoint that triggers when err != nil
tubthumper8
9 months ago
|
prev
|
next
[–]
Inline breakpoint, the same way you set a breakpoint on an expression in any language
bccdee
9 months ago
|
prev
[–]
You wouldn't. Rust's ? operator doesn't permit that either. If you need to put a breakpoint there, put a line break there.
mseepgood
9 months ago
|
parent
[–]
One reason I consider Rust's approach worse than Go's.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: