Closed
Bug 257344
Opened 20 years ago
Closed 20 years ago
Remove Exit from common subroutines
Categories
(Bugzilla :: Bugzilla-General, defect, P2)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: bugreport, Assigned: bugreport)
References
Details
Attachments
(1 file)
2.12 KB,
patch
|
justdave
:
review+
glob
:
review+
|
Details | Diff | Splinter Review |
If a routine is called and throws an error, that error ends with exit() instead
of die(). exit() cannot be trapped by an eval {} while die() can be. This
means that neither whining nor collectstats can reciver from an error in one
query and continue on to the next query.
Assignee | ||
Comment 1•20 years ago
|
||
The way to do this is probably to make a new
Bugzilla->Batch that, if set, causes all the error code to use die() instead of
exit() so errors can be caught.
Assignee: justdave → bugreport
Priority: -- → P2
Target Milestone: --- → Bugzilla 2.22
Comment 2•20 years ago
|
||
This has wider implications than just cron scripts. What about alternative UIs
that need non-HTML error messages? We really need a much more broadly
encompassing exception mechanism. See also bug 173626.
Assignee | ||
Comment 3•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Attachment #161114 -
Flags: review?(justdave)
Comment on attachment 161114 [details] [diff] [review]
Patch v1 - captures errors to die() if Bugzilla->batch has been called with non-zero argument
r=glob, while the output isn't pretty, it's better than it falling through.
Attachment #161114 -
Flags: review+
Assignee | ||
Comment 5•20 years ago
|
||
This should make Gerv and Erik's existing eval's trap the errors properly.
Flags: blocking2.20?
Flags: approval?
Assignee | ||
Updated•20 years ago
|
Target Milestone: Bugzilla 2.22 → Bugzilla 2.20
Comment 6•20 years ago
|
||
Comment on attachment 161114 [details] [diff] [review]
Patch v1 - captures errors to die() if Bugzilla->batch has been called with non-zero argument
I'm not sure batch is a good name for this, but "noninteractive" seems too
long, and I can't come up with anything better. Otherwise this looks nice.
Attachment #161114 -
Flags: review?(justdave)
Updated•20 years ago
|
Flags: blocking2.20?
Flags: blocking2.20+
Flags: approval?
Flags: approval+
Assignee | ||
Comment 7•20 years ago
|
||
Checked in....
Erik, Gerv: You're on....
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•