/*******************************************************************************
 * Copyright (c) 2004 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/
package org.eclipse.birt.report.engine.api;

import java.util.Locale;
import java.util.ResourceBundle;

import org.eclipse.birt.core.exception.BirtException;
import org.eclipse.birt.report.engine.i18n.EngineResourceHandle;

/**
 * Define an engine exception that clients of the engine need to handle. EngineException
 * builds on top of BireException and provides resource bundle support
 */
public class EngineException extends BirtException {
	
	static protected ResourceBundle rb = new EngineResourceHandle(Locale.getDefault()).getResourceBundle();
	
	/**
	 * @param errorCode erroe code for the exception
	 * @param arg0 message argument
	 */
	public EngineException( String errorCode, Object arg0 )
	{
		super( errorCode, arg0, rb);
	}
	
	/**
	 * @param errorCode
	 * @param arg0 message argument
	 * @param cause the cause of the exception
	 */
	public EngineException( String errorCode, Object arg0,
			Throwable cause )
	{
		super( errorCode, arg0, rb, cause );
	}
	
	/**
	 * @param errorCode error code
	 * @param args message argument
	 */
	public EngineException( String errorCode, Object[] args)
	{
		super( errorCode, args, rb );
	}
	
	/**
	 * @param errorCode error code
	 * @param args message arguments
	 * @param cause the cause of the exception
	 */
	public EngineException( String errorCode, Object[] args,
			Throwable cause )
	{
		super( errorCode, args, rb, cause );
	}
	
	/**
	 * @param errorCode the error code
	 */
	public EngineException( String errorCode)
	{
		super( errorCode, rb );
	}
	
	/**
	 * @param errorCode the error code for the exception
	 * @param cause the cause of the exception
	 */
	public EngineException( String errorCode,Throwable cause )
	{
		super( errorCode, rb, cause );
	}
}

@@ -1077,21 +1077,111 @@
 le();%0A%09%0A
+%09protected static final String pluginId = %22org.eclipse.birt.report.engine%22; //$NON-NLS-1$%0A
 %09/**%0A
-
 %09 * @par
@@ -1320,32 +1320,42 @@
 g0 )%0A%09%7B%0A%09%09super(
+pluginId, 
  errorCode, arg0
@@ -1554,32 +1554,42 @@
 se )%0A%09%7B%0A%09%09super(
+ pluginId,
  errorCode, arg0
@@ -1744,32 +1744,42 @@
 rgs)%0A%09%7B%0A%09%09super(
+ pluginId,
  errorCode, args
@@ -1993,32 +1993,42 @@
 se )%0A%09%7B%0A%09%09super(
+ pluginId,
  errorCode, args
@@ -2139,32 +2139,42 @@
 ode)%0A%09%7B%0A%09%09super(
+ pluginId,
  errorCode, rb )
@@ -2351,24 +2351,24 @@
 se )%0A%09%7B%0A
-
 %09%09super(
  errorCo
@@ -2359,16 +2359,26 @@
 %09%09super(
+ pluginId,
  errorCo

Enhance the EngineException, add pluginID to exception