/*
// $Id: //guest/julian_hyde/mondrian/src/main/mondrian/resource/Error.java#1 $
// This software is subject to the terms of the Common Public License
// Agreement, available at the following URL:
// http://www.opensource.org/licenses/cpl.html.
// (C) Copyright 2001-2002 Kana Software, Inc. and others.
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
//
// jhyde, 3 December, 2001
*/
package mondrian.resource;
/**
* An <code>Error</code> is an an error which can be constructed from a
* resource and a set of arguments. It implements {@link ChainableThrowable},
* so can chain it to a previous error.
*
* @author jhyde
* @since 3 December, 2001
* @version $Id: //guest/julian_hyde/mondrian/src/main/mondrian/resource/Error.java#1 $
**/
public class Error extends java.lang.Error implements ChainableThrowable
{
private Throwable nextThrowable;
private int code;
public Error(Throwable err, Resource res, int code, Object[] args)
{
super(res.formatError(code, args));
this.nextThrowable = err;
this.code = code;
}
// implement ChainableThrowable
public Throwable getNextThrowable()
{
return nextThrowable;
}
public void setNextThrowable(Throwable err)
{
nextThrowable = err;
}
public int getCode()
{
return code;
}
}
// End Error.java