【Java开源代码栏目提醒】:本文主要为网学会员提供CBInternalException.java,希望对需要CBInternalException.java网友有所帮助,学习一下!
/**
* The contents of this file are subject to the ClickBlocks Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.clickblocks.org
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied, including, but not limited to, the implied warranties of
* merchantability, fitness for a particular purpose and
* non-infringement. See the License for the specific language
* governing rights and limitations under the License.
*
* ClickBlocks, the ClickBlocks logo and combinations thereof are
* trademarks of ClickBlocks, LLC in the United States and other
* countries.
*
* The Initial Developer of the Original Code is ClickBlocks, LLC.
* Portions created by ClickBlocks, LLC are Copyright (C) 2000.
* All Rights Reserved.
*
*/
/*
* $Log: CBInternalException.java,v $
* Revision 1.2 2000/11/22 08:23:29 mgrand
* Changed OrganizationalEntityResponsibleForAccounts to ResponsibleEntity
*
* Revision 1.1 2000/10/11 12:18:10 mark
* Initial Version
*
*/
// - - - - - - - - - - - - - -
package org.clickblocks.util;
// - - - - - - - - - - - - - -
/**
* CBInternalException
*//**
* This is an unchecked exception that is thrown by classes that
* implement ClickBlocks interfaces in cases where it is not
* appropriate to throw a checked <code>CBException</code>.
* @author Mark Grand
* @Version 0.820
*/
public class CBInternalException extends RuntimeException
{
/**
* the exception that caused this one
*/
private Throwable underlyingException;
/**
* Constructor
*
* @param source the exception source, usually a ClickBlocks class
* @param msg the exception message
*/
public CBInternalException( String source, String msg )
{
this(source, msg, null);
}
/**
* Constructor
*
* @param source the exception source, usually a ClickBlocks class
* @param msg the exception message
* @param underlyingException the exception that caused this one
*/
public CBInternalException( String source, String msg,
Throwable underlyingException )
{
super( Timestamp.getTimeStamp() + " [ClickBlocks." + source.trim() +"] " + msg.trim() );
this.underlyingException = underlyingException;
}
/**
* Returns the Exception that caused this one or null.
*
* @return the underlying Exception
*/
public Throwable getUnderlyingException()
{
return( underlyingException );
}
}
上一篇:
CBException.java
下一篇:
让我掉下眼泪的