Closed
Bug 1645114
Opened 6 years ago
Closed 2 years ago
Don't throw exceptions from methods that return GeckoResult
Categories
(GeckoView :: General, defect, P2)
Tracking
(firefox127 fixed)
RESOLVED
FIXED
127 Branch
| Tracking | Status | |
|---|---|---|
| firefox127 | --- | fixed |
People
(Reporter: snorp, Assigned: polly)
References
Details
(Keywords: good-first-bug)
Attachments
(1 file)
When calling a method that returns a GeckoResult, it's a fair expectation that any errors will come via the returned GeckoResult instead via a thrown exception. If you have to handle both, it makes for some ugly code:
try {
foo.bar().then(val -> {
// do something with val
}, ex -> {
// error handling
});
} catch (IllegalStateException e) {
// more error handling
}
We should change any spots where we throw in these cases to fail the returned GeckoResult instead.
Comment 1•6 years ago
|
||
See also bug 1644998 as one of the signatures that show this problem.
See Also: → 1644998
Updated•6 years ago
|
Severity: -- → S3
Priority: -- → P2
Updated•4 years ago
|
Whiteboard: good-first-bug
Updated•4 years ago
|
Keywords: good-first-bug
Whiteboard: good-first-bug
| Assignee | ||
Updated•2 years ago
|
Assignee: nobody → pmceldowney
| Assignee | ||
Comment 2•2 years ago
|
||
Also remove exception handling at call site in Android components - no need to catch exceptions for method that no longer throws.
Pushed by pmceldowney@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/181b60bf152b
for screenshot capture, include exception in failure result rather than throwing. r=geckoview-reviewers,tthibaud,twhite
Comment 4•2 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 2 years ago
status-firefox127:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•