You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider one might utilize a Must func chaining...
...url:="somewhere"// if using Must chaining...text:=p.MustNavigate(url).MustElement("ul > li").MustText()
// otherwise one might do...iferr:=p.Navigate(url); err==nil {
handleErr(err)
return
}
elem, err:=p.Element("ul > li")
iferr!=nil {
handleErr(err)
return
}
...// on and on... or...// what if...text, err:=p.MustNavigate(url).MustElement("ul > li").MustText().Do() // Do() will terminate the function call...
I believe that usage of Must chaining already implies that the developer giving up the conciseness on error handling, in exchange of readability.
I looked into some PRs (more specifically for #428 AND #433); panics can only be handled via panic handler from browser end.
By the nature of the current Must chaining implementation, I imagine a bit of tweaks could keep us away from panic handling, by propagating the initial error. But, again, i assume there has been countless discussions upon this issue.
So... I would like to know whether there is any ongoing discussion behind this issue, or even this being an issue any longer.
Eagerly waiting for response 👍
The text was updated successfully, but these errors were encountered:
I do agree on the part where it is more error prone. But still I do believe there could...(?) be a better way.
I will close this issue for now. Hopefully I could bring some useful PR about it.
Rod Version: v0.108.2
A Question...
Consider one might utilize a Must func chaining...
I believe that usage of Must chaining already implies that the developer giving up the conciseness on error handling, in exchange of readability.
I looked into some PRs (more specifically for #428 AND #433); panics can only be handled via panic handler from browser end.
By the nature of the current Must chaining implementation, I imagine a bit of tweaks could keep us away from panic handling, by propagating the initial error. But, again, i assume there has been countless discussions upon this issue.
So... I would like to know whether there is any ongoing discussion behind this issue, or even this being an issue any longer.
Eagerly waiting for response 👍
The text was updated successfully, but these errors were encountered: