James Moger
2011-10-25 486ee115abb831b2ec78be6777fb1bca9e931df0
commit | author | age
f13c4c 1 /*
JM 2  * Copyright 2011 gitblit.com.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
166e6a 16 package com.gitblit;
JM 17
31abc2 18 import java.io.IOException;
JM 19
892570 20 /**
88598b 21  * GitBlitException is a marginally useful class. :)
892570 22  * 
JM 23  * @author James Moger
88598b 24  * 
892570 25  */
31abc2 26 public class GitBlitException extends IOException {
166e6a 27
JM 28     private static final long serialVersionUID = 1L;
29
30     public GitBlitException(String message) {
31         super(message);
32     }
31abc2 33
JM 34     /**
35      * Exception to indicate that the client should prompt for credentials
36      * because the requested action requires authentication.
37      */
38     public static class UnauthorizedException extends GitBlitException {
39
40         private static final long serialVersionUID = 1L;
41
42         public UnauthorizedException(String message) {
43             super(message);
44         }
45     }
46
47     /**
48      * Exception to indicate that the requested action can not be executed by
49      * the specified user.
50      */
51     public static class ForbiddenException extends GitBlitException {
52
53         private static final long serialVersionUID = 1L;
54
55         public ForbiddenException(String message) {
56             super(message);
57         }
58     }
b2fde8 59     
JM 60     /**
61      * Exception to indicate that the requested action can not be executed by
62      * the server because it does not recognize the request type.
63      */
64     public static class UnknownRequestException extends GitBlitException {
65
66         private static final long serialVersionUID = 1L;
67
68         public UnknownRequestException(String message) {
69             super(message);
70         }
71     }
166e6a 72 }