message: Catch errors.
diff: @@ -74,6 +74,7 @@ export class GraphicsPreview {
  if (!fs.existsSync(filePath)) {
  return undefined
  }
  + try {
  if (/\.pdf$/i.exec(filePath)) {
  const dataUrl = await this.extension.snippetView.renderPdf(vscode.Uri.file(filePath), pageNumber)
  if (!dataUrl) {
  @@ -91,6 +92,13 @@ export class GraphicsPreview {
  return dataUrl
  }
  return undefined
  + } catch (e: unknown) {
  + this.extension.logger.addLogMessage(`Failed to renderGraphicsAsDataUrl: ${filePath}`)
  + if (e instanceof Error) {
  + this.extension.logger.logError(e)
  + }
  + return undefined
  + }
  }
  private findFilePath(relPath: string, document: vscode.TextDocument): string | undefined {
  