1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org 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 Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 
29 // NOTE:
30 // This class does not yet exist before 1.8.0.8. When we move our shipped
31 // version to 1.8.0.8 or higher, this file here can be removed from CVS.
32 
33 package org.hsqldb.lib;
34 
35 /** is a RuntimeException which indicates failure during basic IO
36  *  operations in a FileAccess implementation.
37  *
38  * @author frank.schoenheit@sun.com
39  *
40  * @version 1.8.0.8
41  * @since 1.8.0.8
42  */
43 public class FileSystemRuntimeException extends java.lang.RuntimeException {
44 
45     public static final int fileAccessRemoveElementFailed = 1;
46     public static final int fileAccessRenameElementFailed = 2;
47 
48     private final int errorCode;
49 
50     public FileSystemRuntimeException(int _errorCode) {
51         super();
52         errorCode = _errorCode;
53     }
54 
55     public FileSystemRuntimeException(String _message, int _errorCode) {
56         super(_message);
57         errorCode = _errorCode;
58     }
59 
60     public FileSystemRuntimeException(String _message, java.lang.Throwable _cause, int _errorCode) {
61         super(_message, _cause);
62         errorCode = _errorCode;
63     }
64 
65     public FileSystemRuntimeException(java.lang.Throwable _cause, int _errorCode) {
66         super(_cause);
67         errorCode = _errorCode;
68     }
69 
70     public final int getErrorCode() {
71         return errorCode;
72     }
73 }