Closed
Bug 310111
Opened 19 years ago
Closed 15 years ago
Milestone::check_milestone and similar subroutines should return a generic error
Categories
(Bugzilla :: Bugzilla-General, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: gregaryh, Unassigned)
Details
Currently they simply throw a user error. This makes it less than desireable for non cgi scripts such as importxml.pl. This means if an invalid milestone is passed, control exits the calling script and is taken over by the Template code. It should instead return an error code and the calling code should handle it.
Comment 1•19 years ago
|
||
Look at Bugzilla->batch If set to one, it will keep the Throw*Error functions from exiting so they can be called from within an eval to field these sorts of errors. Does that cover your application?
Comment 3•19 years ago
|
||
I guess this bug should be more generic and involve all .pm modules. Maybe should ThrowUserError() check whether i_am_cgi() is true or false, and return the error message accordingly, i.e. with or without HTML.
| Reporter | ||
Comment 4•19 years ago
|
||
I have set the batch to 1 and used evals but it still seems to be a not very elegent solution.
No longer blocks: 285614
Comment 5•18 years ago
|
||
(In reply to comment #4) > I have set the batch to 1 and used evals but it still seems to be a not very > elegent solution. > That's the solution I used in bug 174039 and it's working fine. Not really elegant, I agree but this works for now.
| Reporter | ||
Comment 6•15 years ago
|
||
Bugzilla ERROR_MODES makes this moot.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•