Closed
Bug 745197
Opened 13 years ago
Closed 13 years ago
Add a hook in Bugzilla::Error::_throw_error() so that extensions can control the way to throw errors
Categories
(Bugzilla :: Extensions, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.2
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
Attachments
(1 file, 1 obsolete file)
7.62 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
Testopia uses JSON heavily to refresh its pages (rather than reloading the whole HTML pages again and again) and when something goes wrong, it must format errors to be understood by the JSON client. Extensions can define their own ERROR_MODE_* codes and pass them to Bugzilla->error_mode(), but they have no way to take advantage of this as Bugzilla::Error::_throw_error() has no hook to handle custom error codes. So we need one.
![]() |
Assignee | |
Comment 1•13 years ago
|
||
Ideally, I would like to take it for 4.2.1, as it's needed by Testopia to work without having to hack the source code of Bugzilla.
Assignee: extensions → LpSolit
Status: NEW → ASSIGNED
Attachment #614855 -
Flags: review?(timello)
Attachment #614855 -
Flags: review?(dkl)
![]() |
Assignee | |
Comment 2•13 years ago
|
||
Oops, I forgot to include code-error.html.tmpl in the patch. I added the same ID as in user-error.html.tmpl, which already defines it.
Attachment #614855 -
Attachment is obsolete: true
Attachment #614855 -
Flags: review?(timello)
Attachment #614855 -
Flags: review?(dkl)
Attachment #614857 -
Flags: review?(timello)
Attachment #614857 -
Flags: review?(dkl)
Comment 3•13 years ago
|
||
Comment on attachment 614857 [details] [diff] [review]
patch, v1.1
Review of attachment 614857 [details] [diff] [review]:
-----------------------------------------------------------------
No issues that I can see and the hook works as expected in my testing. r=dkl
Attachment #614857 -
Flags: review?(dkl) → review+
![]() |
Assignee | |
Updated•13 years ago
|
Attachment #614857 -
Flags: review?(timello)
![]() |
Assignee | |
Comment 5•13 years ago
|
||
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Error.pm
modified Bugzilla/Hook.pm
modified extensions/Example/Extension.pm
modified template/en/default/global/code-error.html.tmpl
Committed revision 8201.
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.2/
modified Bugzilla/Error.pm
modified Bugzilla/Hook.pm
modified extensions/Example/Extension.pm
modified template/en/default/global/code-error.html.tmpl
Committed revision 8077.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•