1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 
25 // NOTE:
26 // This class does not yet exist before 1.8.0.8. When we move our shipped
27 // version to 1.8.0.8 or higher, this file here can be removed from CVS.
28 
29 package org.hsqldb.lib;
30 
31 /** is a RuntimeException which indicates failure during basic IO
32  *  operations in a FileAccess implementation.
33  *
34  * @author frank.schoenheit@sun.com
35  *
36  * @version 1.8.0.8
37  * @since 1.8.0.8
38  */
39 public class FileSystemRuntimeException extends java.lang.RuntimeException {
40 
41     public static final int fileAccessRemoveElementFailed = 1;
42     public static final int fileAccessRenameElementFailed = 2;
43 
44     private final int errorCode;
45 
FileSystemRuntimeException(int _errorCode)46     public FileSystemRuntimeException(int _errorCode) {
47         super();
48         errorCode = _errorCode;
49     }
50 
FileSystemRuntimeException(String _message, int _errorCode)51     public FileSystemRuntimeException(String _message, int _errorCode) {
52         super(_message);
53         errorCode = _errorCode;
54     }
55 
FileSystemRuntimeException(String _message, java.lang.Throwable _cause, int _errorCode)56     public FileSystemRuntimeException(String _message, java.lang.Throwable _cause, int _errorCode) {
57         super(_message, _cause);
58         errorCode = _errorCode;
59     }
60 
FileSystemRuntimeException(java.lang.Throwable _cause, int _errorCode)61     public FileSystemRuntimeException(java.lang.Throwable _cause, int _errorCode) {
62         super(_cause);
63         errorCode = _errorCode;
64     }
65 
getErrorCode()66     public final int getErrorCode() {
67         return errorCode;
68     }
69 }