FileDocCategorySizeDatePackage
ModelVetoException.javaAPI DocGlassfish v2 API4847Fri May 04 22:34:42 BST 2007com.sun.jdo.api.persistence.model

ModelVetoException

public class ModelVetoException extends ModelException
author
raccah
version
%I%

Fields Summary
private Throwable
_target
This field holds the target if the ModelVetoException (Throwable target) constructor was used to instantiate the object
Constructors Summary
public ModelVetoException()
Creates new ModelVetoException without detail message and null as the target exception.

	
public ModelVetoException(String msg)
Constructs an ModelVetoException with the specified detail message and null as the target exception..

param
msg the detail message.

		super(msg);
	
public ModelVetoException(Throwable target)
Constructs a ModelVetoException with a target exception.

		super();
		_target = target;
	
public ModelVetoException(Throwable target, String s)
Constructs a ModelVetoException with a target exception and a detail message.

		super(s);
		_target = target;
	
Methods Summary
public java.lang.StringgetMessage()
Returns the error message string of this throwable object.

return
the error message string of this ModelVetoException object if it was created with an error message string, the error message of the target exception if it was not created a message but the target exception has a message, or null if neither has an error message.

		String message = super.getMessage();

		if (StringHelper.isEmpty(message))
		{
			Throwable target = getTargetException();

			message	= target.getMessage();
		}

		return message;
	
public java.lang.ThrowablegetTargetException()
Get the thrown target exception.

 return _target; 
public voidprintStackTrace()
Prints the stack trace of the thrown target exception.

see
java.lang.System#err

		printStackTrace(System.err);
	
public voidprintStackTrace(java.io.PrintStream ps)
Prints the stack trace of the thrown target exception to the specified print stream.

		synchronized (ps)
		{
			Throwable target = getTargetException();

			if (target != null)
			{
				ps.print(getClass() + ": ");			// NOI18N
				target.printStackTrace(ps);
			}
			else
				super.printStackTrace(ps);
		}
	
public voidprintStackTrace(java.io.PrintWriter pw)
Prints the stack trace of the thrown target exception to the specified print writer.

		synchronized (pw)
		{
			Throwable target = getTargetException();

			if (target != null)
			{
				pw.print(getClass() + ": ");			// NOI18N
				target.printStackTrace(pw);
			}
			else
				super.printStackTrace(pw);
		}