1 /*
2 * Copyright 2012 Chris Pheby
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 */
16 package org.jadira.scanner.core.exception;
17
18 /**
19 * Indicates a problem arising reading a file
20 */
21 public class FileAccessException extends RuntimeException {
22
23 /**
24 * serialVersionUID for this class
25 */
26 private static final long serialVersionUID = -2088658342781148714L;
27
28 /**
29 * Constructs an {@code ClasspathAccessException} with {@code null} as its error detail message.
30 */
31 public FileAccessException() {
32 super();
33 }
34
35 /**
36 * Constructs an {@code ClasspathAccessException} with the specified detail message.
37 * @param message The detail message (which is saved for later retrieval by the
38 * {@link #getMessage()} method)
39 */
40 public FileAccessException(String message) {
41 super(message);
42 }
43
44 /**
45 * Constructs an {@code ClasspathAccessException} with the specified detail message and cause.
46 * <p>
47 * Note that the detail message associated with {@code cause} is <i>not</i> automatically
48 * incorporated into this exception's detail message.
49 * @param message The detail message (which is saved for later retrieval by the
50 * {@link #getMessage()} method)
51 * @param cause The cause (which is saved for later retrieval by the {@link #getCause()}
52 * method). (A null value is permitted, and indicates that the cause is nonexistent
53 * or unknown.)
54 */
55 public FileAccessException(String message, Throwable cause) {
56 super(message, cause);
57 }
58
59 /**
60 * Constructs an {@code ClasspathAccessException} with the specified cause and a detail message of
61 * {@code (cause==null ? null : cause.toString())} (which typically contains the class and
62 * detail message of {@code cause}). This constructor is useful for IntrospectionExceptions
63 * that are little more than wrappers for other {@link Throwable} instances.
64 * @param cause The cause (which is saved for later retrieval by the {@link #getCause()}
65 * method). (A null value is permitted, and indicates that the cause is nonexistent
66 * or unknown.)
67 */
68 public FileAccessException(Throwable cause) {
69 super(cause);
70 }
71 }