1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.ratings

File RatingsException.java

 

Coverage histogram

../../../img/srcFileCovDistChart0.png
83% of files have more coverage

Code metrics

0
5
4
1
92
29
4
0.8
1.25
4
1

Classes

Class Line # Actions
RatingsException 30 5 0% 4 9
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.ratings;
21   
22    import com.xpn.xwiki.XWikiException;
23   
24    /**
25    * RatingsException definition.
26    *
27    * @version $Id: a7a003f71ccc7ec43a114f023952559d441ae9a5 $
28    * @since 6.4M3
29    */
 
30    public class RatingsException extends XWikiException
31    {
32    private static final long serialVersionUID = 1L;
33   
34    // Module
35    public static final int MODULE_PLUGIN_RATINGS = 1120;
36   
37    // Error list
38    public static final int ERROR_RATINGS_CREATECONTAINER_NULLSPACE = 1120001;
39   
40    public static final int ERROR_RATINGS_ADDRATING_NULLCONTAINER = 1120002;
41   
42    public static final int ERROR_RATINGS_ADDRATING_NULLCONTENT = 1120003;
43   
44    public static final int ERROR_RATINGS_INVALID_RATING_ID = 1120004;
45   
46    public static final int ERROR_RATINGS_SAVERATING_NULLDOCUMENT = 1120005;
47   
48    /**
49    * RatingsException default constructor
50    */
 
51  0 toggle public RatingsException()
52    {
53    }
54   
55    /**
56    * RatingsException constructor.
57    *
58    * @param module the module in which the exception occurred
59    * @param code the code for the generated exception
60    * @param message the message for the generated exception
61    */
 
62  0 toggle public RatingsException(int module, int code, String message)
63    {
64  0 super(module, code, message);
65    }
66   
67    /**
68    * RatingsException constructor.
69    *
70    * @param module the module in which the exception occurred
71    * @param code the code for the generated exception
72    * @param message the message for the generated exception
73    * @param e the XWikiException that occurred
74    */
 
75  0 toggle public RatingsException(int module, int code, String message, Exception e)
76    {
77  0 super(module, code, message, e);
78    }
79   
80    /**
81    * RatingsException constructor.
82    *
83    * @param e the XWikiException that occurred
84    */
 
85  0 toggle public RatingsException(XWikiException e)
86    {
87  0 super(e.getModule(), e.getCode(), e.getMessage());
88   
89  0 initCause(e.getCause());
90  0 setArgs(e.getArgs());
91    }
92    }