summaryrefslogtreecommitdiffstats
path: root/extensions/example/lib
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-05-28 05:08:59 +0200
committermkanat%bugzilla.org <>2008-05-28 05:08:59 +0200
commite0db56e755e94e07677faa3729a4affe38a3ce18 (patch)
tree4aaaa2e81eca3dd0379c16982bbed3754bc59a62 /extensions/example/lib
parent993a1c53229e174d4c2bd1d67acef6363c12db50 (diff)
downloadbugzilla-e0db56e755e94e07677faa3729a4affe38a3ce18.tar.gz
bugzilla-e0db56e755e94e07677faa3729a4affe38a3ce18.tar.xz
Bug 435507: Provide a method of hooking the WebService error codes
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=ghendricks, a=mkanat
Diffstat (limited to 'extensions/example/lib')
-rw-r--r--extensions/example/lib/WSExample.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/extensions/example/lib/WSExample.pm b/extensions/example/lib/WSExample.pm
index ced4c6d36..146867294 100644
--- a/extensions/example/lib/WSExample.pm
+++ b/extensions/example/lib/WSExample.pm
@@ -21,10 +21,12 @@
package extensions::example::lib::WSExample;
use strict;
use warnings;
-
use base qw(Bugzilla::WebService);
+use Bugzilla::Error;
# This can be called as Example.hello() from XML-RPC.
sub hello { return 'Hello!'; }
+sub throw_an_error { ThrowUserError('example_my_error') }
+
1;