private void LoadAttachmentContents(AttachmentData attachmentData, string attachmentPath) { using (Stream attachmentStream = reportContainer.OpenRead(attachmentPath)) { // TODO: How should we handle missing attachments? Currently we just throw an exception. try { attachmentData.LoadContents(attachmentStream); } catch (Exception ex) { throw new IOException(String.Format(CultureInfo.CurrentCulture, "Unable to load report attachment from file: '{0}'.", attachmentPath), ex); } } }