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