IContentEmitter emitter = extManager.createEmitter( format, emitterID );
IContentEmitter emitter = null; try { emitter = extManager.createEmitter( format, emitterID ); } catch(Throwable t) { log.log( Level.SEVERE, "Report engine can not create {0} emitter.", format ); throw new EngineException( MessageConstants.CANNOT_CREATE_EMITTER_EXCEPTION, t ); }
	private IContentEmitter createContentEmitter( ReportExecutor executor )			throws EngineException	{		// create the emitter services object that is needed in the emitters.		EngineEmitterServices services = new EngineEmitterServices( this );		EngineConfig config = engine.getConfig( );		if ( config != null )		{			services.setEmitterConfig( config.getEmitterConfigs( ) );		}		services.setRenderOption( renderOptions );		services.setExecutor( executor );		services.setRenderContext( appContext );		services.setReportRunnable( runnable );		String format = executionContext.getOutputFormat( );		if ( format == null )		{			format = "html";		}		ExtensionManager extManager = ExtensionManager.getInstance( );		if ( !extManager.getSupportedFormat( ).contains( format ) )		{			log.log( Level.SEVERE,					MessageConstants.FORMAT_NOT_SUPPORTED_EXCEPTION, format );			throw new EngineException(					MessageConstants.FORMAT_NOT_SUPPORTED_EXCEPTION, format );		}		IContentEmitter emitter = extManager.createEmitter( format, emitterID );		if ( emitter == null )		{			log.log( Level.SEVERE, "Report engine can not create {0} emitter.",					format ); // $NON-NLS-1$			throw new EngineException(					MessageConstants.CANNOT_CREATE_EMITTER_EXCEPTION );		}		// localized emitter		emitter = new LocalizedEmitter( executionContext, emitter );		// if we need do the paginate, do the paginate.		if ( format.equalsIgnoreCase( "html" ) )		{			boolean paginate = true;			if ( renderOptions instanceof HTMLRenderOption )			{				HTMLRenderOption htmlOption = (HTMLRenderOption) renderOptions;				paginate = htmlOption.getHtmlPagination( );			}			if ( paginate )			{				emitter = new HTMLPaginationEmitter( executor, null, emitter );			}		}		else if ( format.equalsIgnoreCase( "fo" )				|| format.equalsIgnoreCase( "fop" ) )		{			emitter = new DefaultPaginationEmitter( executor, null, emitter );		}		// emitter is not null		emitter.initialize( services );		return emitter;	}