All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.novell.ldapchai.exception.ChaiOperationException Maven / Gradle / Ivy

There is a newer version: 0.8.7
Show newest version
/*
 * LDAP Chai API
 * Copyright (c) 2006-2017 Novell, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package com.novell.ldapchai.exception;

/**
 * General exception for all types of LDAP errors generated by Chai.
 * The underlying message and/or error code is inferred from responses generated by the
 * ldap server or underlying API such as JNDI.
 *
 * @author Jason D. Rivard
 * @see ChaiError
 */
public class ChaiOperationException extends ChaiException
{
    public static ChaiOperationException forErrorMessage( final String errorMessage )
    {
        return new ChaiOperationException( errorMessage, ChaiErrors.getErrorForMessage( errorMessage ) );
    }

    public static ChaiOperationException forErrorMessage( final String errorMessage, final Throwable cause )
    {
        return new ChaiOperationException( errorMessage, ChaiErrors.getErrorForMessage( errorMessage ), cause );
    }

    public ChaiOperationException( final String message, final ChaiError errorCode )
    {
        super( message, errorCode );
    }

    public ChaiOperationException( final String message, final ChaiError errorCode, final Throwable cause )
    {
        super( message, errorCode, cause );
    }

    public ChaiOperationException( final String message, final ChaiError errorCode, final boolean permanent, final boolean authentication )
    {
        super( message, errorCode, permanent, authentication );
    }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy