Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/xpn/xwiki/plugin/PluginException.java


1   package com.xpn.xwiki.plugin;
2   
3   import com.xpn.xwiki.XWikiException;
4   
5   /**
6    * ===================================================================
7    *
8    * Copyright (c) 2005 XpertNet, All rights reserved.
9    *
10   * This program is free software; you can redistribute it and/or
11   * modify it under the terms of the GNU General Public License
12   * as published by the Free Software Foundation; either version 2
13   * of the License, or (at your option) any later version.
14   *
15   * This program is distributed in the hope that it will be useful,
16   * but WITHOUT ANY WARRANTY; without even the implied warranty of
17   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18   * GNU General Public License for more details, published at
19   * http://www.gnu.org/copyleft/gpl.html or in gpl.txt in the
20   * root folder of this distribution.
21   */
22  public class PluginException extends XWikiException{
23      String pluginName = "";
24  
25      public PluginException(String pluginName, int code, String message, Throwable e, Object[] args)
26      {
27          super(XWikiException.MODULE_XWIKI_PLUGINS, code, pluginName + ": " + message, e, args);
28          setPluginName(pluginName);
29      }
30  
31      public PluginException(String pluginName, int code, String message, Throwable e){
32          super(XWikiException.MODULE_XWIKI_PLUGINS, code, pluginName + ": " + message, e);
33          setPluginName(pluginName);
34      }
35  
36      public PluginException(String pluginName, int code, String message){
37          super(XWikiException.MODULE_XWIKI_PLUGINS, code, pluginName + ": " + message);
38          setPluginName(pluginName);
39      }
40  
41      public PluginException(){
42          super();
43      }
44  
45      public String getPluginName() {
46          return pluginName;
47      }
48  
49      public void setPluginName(String pluginName) {
50          this.pluginName = pluginName;
51      }
52  }