code: def test_plot_exception(self):
      # Force an error in drawing
      fn = next(filename_gen)
      plots = list(p())
      plots[0] += aes(color="unknown")
      with pytest.raises(PlotnineError):
          save_as_pdf_pages(plots, fn, verbose=False)
  
      assert_exist_and_clean(fn, "Plot exception")
  
file_path: plotnine/tests/test_save_as_pdf_pages.py
imports: import warnings
  from pathlib import Path
  import matplotlib.pyplot
  import pytest
  from plotnine import aes, geom_text, ggplot, ggtitle, theme
  from plotnine.data import mtcars
  from plotnine.exceptions import PlotnineError, PlotnineWarning
  from plotnine.ggplot import save_as_pdf_pages
label_desc: Use image node_id 1 for calling the TestExceptions obj's underlying member method code with example usage: obj.test_plot_exception() without return types