/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/**
* The mother of all Exceptions in this bundle. It allows exceptions to have
* their messages translated to the different locales.
*
* The <code>xmlsecurity_en.properties</code> file contains this line:
* <pre>
* xml.WrongElement = Can't create a {0} from a {1} element
* </pre>
*
* Usage in the Java source is:
* <pre>
* {
* Object exArgs[] = { Constants._TAG_TRANSFORMS, "BadElement" };
*
* throw new XMLSecurityException("xml.WrongElement", exArgs);
* }
* </pre>
*
* Additionally, if another Exception has been caught, we can supply it, too>
* <pre>
* try {
* ...
* } catch (Exception oldEx) {
* Object exArgs[] = { Constants._TAG_TRANSFORMS, "BadElement" };
*
* throw new XMLSecurityException("xml.WrongElement", exArgs, oldEx);
* }
* </pre>
*
*
* @author Christian Geuer-Pollmann
*/
/**
*
*/
/** Field originalException */
/** Field msgID */
/**
* Constructor XMLSecurityException
*
*/
public XMLSecurityException() {
super("Missing message string");
this.originalException = null;
}
/**
* Constructor XMLSecurityException
*
* @param _msgID
*/
this.originalException = null;
}
/**
* Constructor XMLSecurityException
*
* @param _msgID
* @param exArgs
*/
this.originalException = null;
}
/**
* Constructor XMLSecurityException
*
* @param _originalException
*/
super("Missing message ID to locate message string in resource bundle \""
+ "\". Original Exception was a "
+ _originalException.getMessage());
this.originalException = _originalException;
}
/**
* Constructor XMLSecurityException
*
* @param _msgID
* @param _originalException
*/
this.originalException = _originalException;
}
/**
* Constructor XMLSecurityException
*
* @param _msgID
* @param exArgs
* @param _originalException
*/
this.originalException = _originalException;
}
/**
* Method getMsgID
*
* @return the messageId
*/
return "Missing message ID";
}
return msgID;
}
/** @inheritDoc */
} else {
message = s;
}
if (originalException != null) {
}
return message;
}
/**
* Method printStackTrace
*
*/
public void printStackTrace() {
if (this.originalException != null) {
}
}
}
/**
* Method printStackTrace
*
* @param printwriter
*/
super.printStackTrace(printwriter);
if (this.originalException != null) {
}
}
/**
* Method printStackTrace
*
* @param printstream
*/
super.printStackTrace(printstream);
if (this.originalException != null) {
}
}
/**
* Method getOriginalException
*
* @return the original exception
*/
return originalException;
}
}