From e0db56e755e94e07677faa3729a4affe38a3ce18 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Wed, 28 May 2008 03:08:59 +0000 Subject: Bug 435507: Provide a method of hooking the WebService error codes Patch By Max Kanat-Alexander r=ghendricks, a=mkanat --- extensions/example/lib/WSExample.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'extensions/example/lib') 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; -- cgit v1.2.3-24-g4f1b