001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 018package org.apache.commons.net.ftp.parser; 019 020/** 021 * This class encapsulates all errors that may be thrown by 022 * the process of an FTPFileEntryParserFactory creating and 023 * instantiating an FTPFileEntryParser. 024 */ 025public class ParserInitializationException extends RuntimeException { 026 027 private static final long serialVersionUID = 5563335279583210658L; 028 029 /** 030 * Constucts a ParserInitializationException with just a message 031 * 032 * @param message Exception message 033 */ 034 public ParserInitializationException(String message) { 035 super(message); 036 } 037 038 /** 039 * Constucts a ParserInitializationException with a message 040 * and a root cause. 041 * 042 * @param message Exception message 043 * @param rootCause root cause throwable that caused 044 * this to be thrown 045 */ 046 public ParserInitializationException(String message, Throwable rootCause) { 047 super(message, rootCause); 048 } 049 050 /** 051 * returns the root cause of this exception or null 052 * if no root cause was specified. 053 * 054 * @return the root cause of this exception being thrown 055 * @deprecated use {@link #getCause()} instead 056 */ 057 @Deprecated 058 public Throwable getRootCause() { 059 return super.getCause(); 060 } 061 062}