/// <summary> /// Returns an error writer in the format specified. Returns null if the format is unknown by the implementation /// </summary> /// <param name="format"> /// The format /// </param> /// <returns> /// Engine, or null if the format is unknown to this factory /// </returns> public IErrorWriterEngine GetErrorWriterEngine(IErrorFormat format) { if (format is SdmxErrorFormat) { return this._errorWriterEngine; } return null; }
private IErrorWriterEngine GetErrorWriterEngine(IErrorFormat outputFormat) { IErrorWriterEngine engine = this._errorWriterFactory.GetErrorWriterEngine(outputFormat); if (engine != null) { return engine; } throw new SdmxNotImplementedException("Could not write error out in format: " + outputFormat); }
public int WriteError(Exception ex, Stream outPutStream, IErrorFormat outputFormat) { return GetErrorWriterEngine(outputFormat).WriteError(ex, outPutStream); }